@@ -17,29 +17,14 @@ contribute to the score.
17
17
in <<query-filter-context,filter context>>, meaning that scoring is ignored
18
18
and clauses are considered for caching.
19
19
20
- |`should` |The clause (query) should appear in the matching document. If the
21
- `bool` query is in a <<query-filter-context,query context>> and has a `must` or
22
- `filter` clause then a document will match the `bool` query even if none of the
23
- `should` queries match. In this case these clauses are only used to influence
24
- the score. If the `bool` query is a <<query-filter-context,filter context>>
25
- or has neither `must` or `filter` then at least one of the `should` queries
26
- must match a document for it to match the `bool` query. This behavior may be
27
- explicitly controlled by settings the
28
- <<query-dsl-minimum-should-match,`minimum_should_match`>> parameter.
20
+ |`should` |The clause (query) should appear in the matching document.
29
21
30
22
|`must_not` |The clause (query) must not appear in the matching
31
23
documents. Clauses are executed in <<query-filter-context,filter context>> meaning
32
24
that scoring is ignored and clauses are considered for caching. Because scoring is
33
25
ignored, a score of `0` for all documents is returned.
34
26
|=======================================================================
35
27
36
- [IMPORTANT]
37
- .Bool query in filter context
38
- ========================================================================
39
- If this query is used in a filter context and it has `should`
40
- clauses then at least one `should` clause is required to match.
41
- ========================================================================
42
-
43
28
The `bool` query takes a _more-matches-is-better_ approach, so the score from
44
29
each matching `must` or `should` clause will be added together to provide the
45
30
final `_score` for each document.
0 commit comments