-
Notifications
You must be signed in to change notification settings - Fork 25.5k
[DOCS] Document minimum_should_match
defaults for bool
query
#48865
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
Conversation
Adds documentation for the `minimum_should_match` parameter to the `bool` query docs. Includes docs for the default values: - `1` if the `bool` query only includes `should` clauses - `0` if the `bool` query includes any other type of clauses
Pinging @elastic/es-search (:Search/Search) |
Pinging @elastic/es-docs (>docs) |
@jpountz Can you let me know what you think of these changes when convenient? Thank 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.
Sorry for missing the review on this PR. I left a suggestion, I wish the default value of this parameter was not that complicated... Thanks for documenting it!
percentage of `should` clauses returned documents _must_ match. | ||
|
||
If the `bool` query includes only `should` clauses, the default value is `1`. | ||
If the `bool` query includes any other type of clause, the default value is `0`. |
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.
It doesn't cover the case when a bool
query includes should
and must_not
clauses, when the default value would still be 1. The below description would be closer to how we choose the default internally (I wish it was not that complicated).
If the `bool` query includes at least one `should` clause and no `must` or `filter` clauses, the default value is `1`.
Otherwise, the default value is `0`.
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.
when i use es7.1.1, only one should,but |
…stic#48865) Adds documentation for the `minimum_should_match` parameter to the `bool` query docs. Includes docs for the default values: - `1` if the `bool` query includes at least one `should` clause and no `must` or `filter` clauses - `0` otherwise
Adds documentation for the
minimum_should_match
parameter to thebool
query docs. Includes docs for the default values:1
if thebool
query only includesshould
clauses0
if thebool
query includes any other type of clauses