Skip to content

Commit 72dd49d

Browse files
authored
[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 6bacdf6 commit 72dd49d

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
@@ -60,6 +60,19 @@ POST _search
6060
}
6161
--------------------------------------------------
6262

63+
[[bool-min-should-match]]
64+
==== Using `minimum_should_match`
65+
66+
You can use the `minimum_should_match` parameter to specify the number or
67+
percentage of `should` clauses returned documents _must_ match.
68+
69+
If the `bool` query includes at least one `should` clause and no `must` or
70+
`filter` clauses, the default value is `1`.
71+
Otherwise, the default value is `0`.
72+
73+
For other valid values, see the
74+
<<query-dsl-minimum-should-match, `minimum_should_match` parameter>>.
75+
6376
[[score-bool-filter]]
6477
==== Scoring with `bool.filter`
6578

0 commit comments

Comments
 (0)