# Cutoff Frequency alternatives

**URL:** <https://discuss.elastic.co/t/cutoff-frequency-alternatives/221257>\
**Category:** Elasticsearch\
**Created:** [February 27, 2020, 2:30pm UTC](https://discuss.elastic.co/t/cutoff-frequency-alternatives/221257 "2020-02-27T14:30:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![enthousiast](https://avatars.discourse-cdn.com/v4/letter/e/35a633/32.png) [@enthousiast](https://discuss.elastic.co/u/enthousiast)\
**Post date:** [February 27, 2020, 2:30pm UTC](https://discuss.elastic.co/t/cutoff-frequency-alternatives/221257/1 "2020-02-27T14:30:56Z")

</div>

Hello,

I'm using Elasticsearch as a search engine for several web applications. I was using cutoff\_frequency to ensure good relevance in different cases :

- for most of our query, it's used for deleveraging high frequency terms score but keeping them into account
- "pure stopwords query" for queries containing only high frequency terms.

By doing this, we do not have to rely on any list of stopwords and the high frequency terms are automatically detected.

We had good results for years using this implementations, but I just noticed that cutoff\_frequency has been deprecated in 7.3.0 ☹

From now it's unclear if this mechanism has been replaced by something. From everything that I understand from the github repo and the documentation, cutoff\_frequency has been replaced by "magic" and everything is working good "out of the box". As it's described by the deprecation message : "you can omit this option, the [multi\_match] query can skip block of documents efficiently if the total number of hits is not tracked".

There is also some statements which are unclear for me about the fact that everything relies magically on the "max\_score" now as stated here : [https://github.com/elastic/elasticsearch/issues/37096](https://github.com/elastic/elasticsearch/issues/37096)

" However in Elasticsearch 7 we have another alternative that can automatically skip non-competitive documents based on the maximum score of each term in the query. This new method doesn't require any configuration (no cutoff frequency) and can be much faster than the `common_terms` alternative if the total number of hits that matches the query is not tracked."

It's unclear for me about how this "thing" is supposed to work. If somebody can provide additional insights about this, it would be very nice.

So far so good, and base on this non-exhaustive knowledge about how things are going since 7.3, I'm in a case where :

- we always track the total number of hits (because we are drawing a pagination based on search results)
- we always have a max\_score:null because we do not rely only on \_score for sorting, but also on some documents fields that can take precedence on the \_score (it's all about pinning some documents at the top).

So my concern here is : considering these 2 points, is it safe to upgrade to 7.3 and get rid of all the previously existing cutoff\_frequency usage, without losing relevancy in search results ?

Regards

---

<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 26, 2020, 2:43pm UTC](https://discuss.elastic.co/t/cutoff-frequency-alternatives/221257/2 "2020-03-26T14:43:41Z")

</div>

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