# 'should\_not' Clause

The `should_not` clause within a `bool` query specifies conditions that are optional for a document to be considered a match, in a similar manner to `'should'` clause. The `should_not` clause decreases the document score. The `should` clause is often used for expressing optional or desirable conditions.

#### 'should\_not' Clause Score <a href="#should_not-clause-score" id="should_not-clause-score"></a>

In the `'should_not'` clause, each condition is associated with a designated score, and the overall score for the clause is determined by substracting these individual scores. If not explicitly specified otherwise, scoring follows the TF-IDF scoring model. The `'should_not'` clause enables documents to be a lesser match if they meet any of the specified conditions.

The combined score is a subtraction of the individual scores

Score = -score1 - score2 - score3...

**Example -**

Copy

```json
{
  "query": {
    "bool": {
      "must": { "Bird": "Asian Koel" }
      "should_not": [
        { "term": { "Country": "India" } },
        { "term": { "Color": "Black" } }
      ]
    }
  }
}
```

In the above example, all candidates must satisfy the condition -

* exact match over the 'bird' field, with score equals TF-IDF score for { "Bird": "Asian Koel" }

In addition, any documents that satisfy the following conditions -

* exact match over the 'Country' field, with score equals TF-IDF score for { "Bird": "Asian Koel" }
* exact match over "Color" field, with score equals TF-IDF score for { "In Stock": "true" }

Will receive lower score. The overall score will be a sum 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/should_not-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.
