# How to achieve same results as cutoff\_frequency with minimum\_should\_match with Elasticsearch 8.X after deprecation of common term queries

**URL:** https://discuss.elastic.co/t/how-to-achieve-same-results-as-cutoff-frequency-with-minimum-should-match-with-elasticsearch-8-x-after-deprecation-of-common-term-queries/316679
**Category:** Elasticsearch
**Created:** [October 15, 2022, 10:24am UTC](https://discuss.elastic.co/t/how-to-achieve-same-results-as-cutoff-frequency-with-minimum-should-match-with-elasticsearch-8-x-after-deprecation-of-common-term-queries/316679 "2022-10-15T10:24:29Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jatinw21](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jatinw21/32/112098_2.png) [@jatinw21](https://discuss.elastic.co/u/jatinw21)
#### Post date: [October 15, 2022, 10:24am UTC](https://discuss.elastic.co/t/how-to-achieve-same-results-as-cutoff-frequency-with-minimum-should-match-with-elasticsearch-8-x-after-deprecation-of-common-term-queries/316679/1 "2022-10-15T10:24:29Z")

</div>

If I make a search for a term in the database of say movie titles, I want it to do an AND query for all the words in the search query that have higher than certain cutoff\_frequency and OR query for all the words in the search query that have lower than certain cutoff\_frequency.

The idea is if I search for "The pirates of the caribbean sea" I want only very unique words to have an AND operator i.e. 'pirates' and 'caribbean' and 'the', 'of' and 'sea' should be searched with 'OR' operator.

In the previous version 6.4, doing this was exactly possible using [common term queries](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/query-dsl-common-terms-query.html) as below -

```auto
GET /_search
{
    "query": {
        "common": {
            "body": {
                "query": "nelly the elephant as a cartoon",
                "cutoff_frequency": 0.001,
                "low_freq_operator": "and"
            }
        }
    }
}

```

How can I achieve the same in the latest version?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [November 12, 2022, 10:25am UTC](https://discuss.elastic.co/t/how-to-achieve-same-results-as-cutoff-frequency-with-minimum-should-match-with-elasticsearch-8-x-after-deprecation-of-common-term-queries/316679/2 "2022-11-12T10:25:18Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
