-
Notifications
You must be signed in to change notification settings - Fork 25.5k
Add documentation for terms_set minimum_should_match parameter #113043
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -159,12 +159,22 @@ GET /job-candidates/_search | |||||||||
`terms`:: | ||||||||||
+ | ||||||||||
-- | ||||||||||
(Required, array of strings) Array of terms you wish to find in the provided | ||||||||||
(Required, array) Array of terms you wish to find in the provided | ||||||||||
`<field>`. To return a document, a required number of terms must exactly match | ||||||||||
the field values, including whitespace and capitalization. | ||||||||||
|
||||||||||
The required number of matching terms is defined in the | ||||||||||
`minimum_should_match_field` or `minimum_should_match_script` parameter. | ||||||||||
The required number of matching terms is defined in the `minimum_should_match`, | ||||||||||
`minimum_should_match_field` or `minimum_should_match_script` parameters. Exactly | ||||||||||
one of these parameters must be provided. | ||||||||||
-- | ||||||||||
|
||||||||||
`minimum_should_match`:: | ||||||||||
+ | ||||||||||
-- | ||||||||||
(Optional) Specification for the number of matching terms required to return | ||||||||||
a document. | ||||||||||
Comment on lines
+174
to
+175
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Restricting to “integer” is incorrect. The value can be anything described on the linked documentation page, some of which are integers, but also many of which are strings with very specific formats: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-minimum-should-match.html |
||||||||||
|
||||||||||
For valid values, see <<query-dsl-minimum-should-match, `minimum_should_match` parameter>>. | ||||||||||
-- | ||||||||||
|
||||||||||
`minimum_should_match_field`:: | ||||||||||
|
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.
Why remove "array of strings" 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.
See the PR description. The elements are not restricted to string, but can be anything parsable to a field value, including JSON “number” types. Documenting as “array of strings” is incorrect and misleading.