1. Docs
  2. Cloaked Search
  3. Usage
  4. Querying
  5. Boolean

Boolean query

A query that matches documents matching boolean combinations of other queries. It is built using one or more boolean clauses. The four clauses are:

ClauseDescription
mustThe clause (query) must appear in matching documents and will contribute to the score.
filterThe clause (query) must appear in matching documents. However unlike must the score of the query will be ignored.
shouldThe clause (query) should appear in the matching document.
must_notThe clause (query) must not appear in the matching documents.

Example

JSON
{ "query": { "bool": { "must": { "match": { "title": "baseball" } }, "filter": { "term": { "tenant_id.keyword": "someid" } } } } }

Was this page helpful?

One sec... bot checking