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
INTMDB-17: Update search #223
Conversation
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.
LGTM!
@@ -281,7 +283,8 @@ type IndexField struct { | |||
// SearchAnalyzer custom analyzer definition. | |||
type SearchAnalyzer struct { | |||
BaseAnalyzer string `json:"baseAnalyzer"` | |||
MaxTokenLength *float64 `json:"maxTokenLength,omitempty"` | |||
MaxTokenLength *int `json:"maxTokenLength,omitempty"` |
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.
any reason for this change? it would be better if we don't but not a blocker
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.
According to the API documentation for search kndexes and analyzers, this property is an int type.
And that makes more sense (how you can limit a token using a float value?)
What do you think?
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.
not a blocker like I said but it's a breaking change so trying to avoid it if we can, since for json all number fields are technically float, the previous implementation was valid (even if wrong) but feel free to merge
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.
ok, It's good to know, so this time I'll merge that change
Thanks for your comment Gustavo
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.
LGTM but first needs Gustavo's question answered on the reason for the float to int change.
Description
Added properties to search index and search analyzer struct in order to complain with the current mongodb atlas API documentation
Link to any related issue(s):
Type of change:
Required Checklist:
make fmt
and formatted my codeFurther comments