Boolean query
/ Bool, / QueryBoolean query #
A query that matches documents matching boolean combinations of other queries. It is built using one or more boolean clauses.
Inside a
nestedquery: supported —must/filter/should/must_notandminimum_should_matchall apply within ONE array element; clauses matched by different elements never combine.
How it works #
bool compiles each clause list into iterator algebra: must clauses
intersect (AND), must_not clauses subtract, filter clauses intersect
without scoring, and should clauses are probed per matched document —
a streaming two-pointer walk that adds each matching should score on
top of the base hit, with no intermediate materialization.