Skip to content

Commit

Permalink
[DOCS] Document minimum_should_match defaults for bool query (#48865
Browse files Browse the repository at this point in the history
)

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
  • Loading branch information
jrodewig authored Dec 4, 2019
1 parent 6bacdf6 commit 72dd49d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/reference/query-dsl/bool-query.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,19 @@ POST _search
}
--------------------------------------------------

[[bool-min-should-match]]
==== Using `minimum_should_match`

You can use the `minimum_should_match` parameter to specify the number or
percentage of `should` clauses returned documents _must_ match.

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`.

For other valid values, see the
<<query-dsl-minimum-should-match, `minimum_should_match` parameter>>.

[[score-bool-filter]]
==== Scoring with `bool.filter`

Expand Down

0 comments on commit 72dd49d

Please sign in to comment.