> For the complete documentation index, see [llms.txt](https://docs.hyper-space.io/hyperspace-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hyper-space.io/hyperspace-docs/api-documentation/dsl-query-framework/bool-queries/must-clause.md).

# '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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
