Skip to content

Commit 62e2a03

Browse files
committed
[DOCS] Document minimum_should_match defaults for bool query (#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
1 parent 0a7fd8f commit 62e2a03

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

docs/reference/query-dsl/bool-query.asciidoc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,19 @@ POST _search
7373
--------------------------------------------------
7474
// CONSOLE
7575

76+
[[bool-min-should-match]]
77+
==== Using `minimum_should_match`
78+
79+
You can use the `minimum_should_match` parameter to specify the number or
80+
percentage of `should` clauses returned documents _must_ match.
81+
82+
If the `bool` query includes at least one `should` clause and no `must` or
83+
`filter` clauses, the default value is `1`.
84+
Otherwise, the default value is `0`.
85+
86+
For other valid values, see the
87+
<<query-dsl-minimum-should-match, `minimum_should_match` parameter>>.
88+
7689
[[score-bool-filter]]
7790
==== Scoring with `bool.filter`
7891

0 commit comments

Comments
 (0)