A newer version of this documentation is available.

View Latest

Boolean Query

    February 16, 2025
    + 12

    A boolean query is a combination of conjunction and disjunction queries. A boolean query takes three lists of queries:

    • must: Result documents must satisfy all of these queries.

    • should: Result documents should satisfy these queries.

    • must not: Result documents must not satisfy any of these queries.

    json
    { "must": { "conjuncts":[{"field":"reviews.content", "match": "location"}]}, "must_not": { "disjuncts": [{"field":"free_breakfast", "bool": false}]}, "should": { "disjuncts": [{"field":"free_breakfast", "bool": true}]} }