# Cutoff Frequency for match queries

**URL:** <https://discuss.elastic.co/t/cutoff-frequency-for-match-queries/296529>\
**Category:** Elasticsearch\
**Created:** [February 7, 2022, 10:02pm UTC](https://discuss.elastic.co/t/cutoff-frequency-for-match-queries/296529 "2022-02-07T22:02:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brodin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brodin/32/101503_2.png) [@Brodin](https://discuss.elastic.co/u/Brodin)\
**Post date:** [February 7, 2022, 10:02pm UTC](https://discuss.elastic.co/t/cutoff-frequency-for-match-queries/296529/1 "2022-02-07T22:02:39Z")

</div>

According to this [Match query | Elasticsearch Guide [7.17] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-match-query.html#query-dsl-match-query-cutoff)  
Cutoff frequency is deprecated and no longer needed, however I am seeing vastly different result for my match query when I remove it.

So which one is it?

Furthermore does it say that it is deprecated only if I don’t care about total hits, which I do, but the deprecation log is printed non-the-less?

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [February 8, 2022, 1:48pm UTC](https://discuss.elastic.co/t/cutoff-frequency-for-match-queries/296529/2 "2022-02-08T13:48:21Z")

</div>

Hey Johan,

care to explain what the different results consist off and how they differ? Are the top-n results different? Or the score? Just to be sure: you are not tracking hits? And with which Elasticsearch version has the index been created?

--Alex

---

<div class="post-metadata">

**Author:** ![Brodin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brodin/32/101503_2.png) [@Brodin](https://discuss.elastic.co/u/Brodin)\
**Post date:** [February 10, 2022, 12:36pm UTC](https://discuss.elastic.co/t/cutoff-frequency-for-match-queries/296529/3 "2022-02-10T12:36:26Z")

</div>

Thanks for your response!

> care to explain what the different results consist off and how they differ?

It is not so much the result as the latency, using cutoff frequency results in 10X faster results using the same match statement when the query string contains high-frequency terms (like stopwords) .

`{match: {operator: "or", query: "the sound of music"}}`

Becomes super slow without adding cutoff\_frequency due to the massive job spent ranking all documents with the terms "the" and "of".

> Just to be sure: you are not tracking hits?

I am not explicitly tracking hits, and even when I send in `"track_total_hits": true` I get the deprecation message, which feels counterintuitive.

> And with which Elasticsearch version has the index been created?

7.16

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [February 17, 2022, 8:43am UTC](https://discuss.elastic.co/t/cutoff-frequency-for-match-queries/296529/4 "2022-02-17T08:43:13Z")

</div>

another quick question: Are you using the `size` parameter?

---

<div class="post-metadata">

**Author:** ![Brodin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brodin/32/101503_2.png) [@Brodin](https://discuss.elastic.co/u/Brodin)\
**Post date:** [February 17, 2022, 10:46am UTC](https://discuss.elastic.co/t/cutoff-frequency-for-match-queries/296529/5 "2022-02-17T10:46:56Z")

</div>

Yes 🙂

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [February 17, 2022, 11:21am UTC](https://discuss.elastic.co/t/cutoff-frequency-for-match-queries/296529/6 "2022-02-17T11:21:48Z")

</div>

To what size? Something rather big or small?

---

<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:** [March 17, 2022, 11:22am UTC](https://discuss.elastic.co/t/cutoff-frequency-for-match-queries/296529/7 "2022-03-17T11:22:10Z")

</div>

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