# 'must' Clause

The 'must' clause specifies conditions that **must be satisfied** for a document to be considered a match. In terms of logical operators, it corresponds to 'and' operator.

#### must' Clause Score <a href="#must-clause-score" id="must-clause-score"></a>

Under the `'must'` clause, each element is assigned a probabilistic rarity score, and the total score for the 'must' clause is calculated by combining these individual scores. Unless specified otherwise, the score is based on the TF-IDF scoring model. .The '`must'` clause is used when you want all specified conditions to be satisfied for a document to be considered a match. Since each score represent a different probability, the combined score is a product of the individual scores

Score = score1 \* score2 \* score3...

Note: This scoring method assumes the 'must' clause are independent of one another

**Example -**

```json
{
  "query": {
    "bool": {
      "must": [
        { "term": { "Bird": "Asian Koel" } },
        { "range": { "price": { "gte": 10} } },
        { "term": { "In Stock": "true" } }
      ]
    }
  }
}
```

In the above example, all candidates must satisfy all three conditions -

* exact match over the 'bird' field, with score equals TF-IDF score for { "Bird": "Asian Koel" }
* The 'price' field must be greater than or equal to 10
* match over "In Stock" field, with score equals TF-IDF score for { "In Stock": "true" }

The overall score will be a product of the individual scores.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hyper-space.io/hyperspace-docs/api-documentation/dsl-query-framework/bool-queries/must-clause.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
