Legacy Docs: This page describes our legacy API. It will be deprecated in
a future version. Please use the v2 API where possible.
Basic Usage
Boolean queries filter documents based on the logical relationships defined by their subqueries, considering:- Documents that satisfy all
mustconditions. - Documents that satisfy none of the
must_notconditions. - Documents that satisfy at least one condition from either
mustorshould.
A query object or an
ARRAY of query objects as conditions which must be
matched.A query object or an
ARRAY of query objects as conditions which must not be
matched.A query object or an
ARRAY of query objects as conditions of which at least
one must be matched.The minimum number of
should conditions that must match for a document to be
returned. Defaults to NULL, which preserves the standard behavior where at
least one should condition must match (unless must clauses are present).must or should must be provided.
must_not acts as a mask and does not produce a result set.