Cutoff Frequency for match queries

According to this Match query | Elasticsearch Guide [7.17] | Elastic
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?

1 Like

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

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

another quick question: Are you using the size parameter?

Yes :slight_smile:

To what size? Something rather big or small?

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