-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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 documentation for terms_set minimum_should_match parameter #113043
Add documentation for terms_set minimum_should_match parameter #113043
Conversation
Documentation preview: |
Pinging @elastic/es-docs (Team:Docs) |
Pinging @elastic/es-search (Team:Search) |
@elasticmachine test this |
run docs-build |
@pquentin approved the corresponding spec changes, does this look good to you? :) |
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.
Thanks! This looks good to me, I just added two nits about the documented types.
Sorry for the reviewing delay.
(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 |
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.
(Optional) Specification for the number of matching terms required to return | ||
a document. |
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.
(Optional) Specification for the number of matching terms required to return | |
a document. | |
(Optional, integer) Specification for the number of matching terms required to return | |
a document. |
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.
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
💔 Backport failedThe backport operation could not be completed due to the following error:
You can use sqren/backport to manually backport by running |
(cherry picked from commit 28715b7)
(cherry picked from commit 28715b7)
(cherry picked from commit 28715b7)
(cherry picked from commit 28715b7)
(cherry picked from commit 28715b7)
(cherry picked from commit 28715b7)
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
(cherry picked from commit 28715b7)
(cherry picked from commit 28715b7) Co-authored-by: mspielberg <[email protected]>
(cherry picked from commit 28715b7) Co-authored-by: mspielberg <[email protected]>
(cherry picked from commit 28715b7) Co-authored-by: mspielberg <[email protected]>
(cherry picked from commit 28715b7) Co-authored-by: mspielberg <[email protected]>
Elasticsearch has supported the
minimum_should_match
parameter for theterms_set
query since 8.10.0 (PR #96082). As mentioned in the original issue ticket (#94095) the additional parameter is not currently documented, so this PR adds documentation.This PR also removes the incorrect documented constraint that the
terms
parameter must consist solely of strings. In fact each term can be any valid FieldValue, as in the normalterms
query.For example, when querying against a field mapped as type
date
the term may be specified with a JSON number as described at (https://www.elastic.co/guide/en/elasticsearch/reference/8.15/date.html).