- Docs
- Cloaked Search
- Usage
- Querying
- 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:
Clause | Description |
---|---|
must | The clause (query) must appear in matching documents and will contribute to the score. |
filter | The clause (query) must appear in matching documents. However unlike must the score of the query will be ignored. |
should | The clause (query) should appear in the matching document. |
must_not | The clause (query) must not appear in the matching documents. |
Example
JSON{ "query": { "bool": { "must": { "match": { "title": "baseball" } }, "filter": { "term": { "tenant_id.keyword": "someid" } } } } }