-
-
Notifications
You must be signed in to change notification settings - Fork 681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add coerce option for text and numbers types #1904
Conversation
allow to coerce the field type when indexing if the type does not match
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #1904 +/- ##
==========================================
- Coverage 94.49% 94.46% -0.04%
==========================================
Files 307 307
Lines 55483 55686 +203
==========================================
+ Hits 52430 52601 +171
- Misses 3053 3085 +32
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unit tests needed (that's a good change though)
Co-authored-by: Paul Masurel <[email protected]>
Yes, I was just checking first if that's the right direction |
@@ -17,6 +18,12 @@ pub struct NumericOptions { | |||
fieldnorms: bool, // This attribute only has an effect if indexed is true. | |||
fast: bool, | |||
stored: bool, | |||
#[serde(skip_serializing_if = "is_false")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason to skip serialization?
#[serde(skip_serializing_if = "is_false")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a little less noise when reading the meta.json
@@ -17,6 +17,14 @@ pub struct TextOptions { | |||
stored: bool, | |||
#[serde(default)] | |||
fast: bool, | |||
#[serde(default)] | |||
#[serde(skip_serializing_if = "is_false")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#[serde(skip_serializing_if = "is_false")] |
allow to coerce the field type when indexing if the type does not match