# Calculation of document frequency for cutoff\_frequency

**URL:** <https://discuss.elastic.co/t/calculation-of-document-frequency-for-cutoff-frequency/21845>\
**Category:** Elasticsearch\
**Created:** [January 27, 2015, 8:13am UTC](https://discuss.elastic.co/t/calculation-of-document-frequency-for-cutoff-frequency/21845 "2015-01-27T08:13:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dany\_Gielow](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@Dany\_Gielow](https://discuss.elastic.co/u/Dany_Gielow)\
**Post date:** [January 27, 2015, 8:13am UTC](https://discuss.elastic.co/t/calculation-of-document-frequency-for-cutoff-frequency/21845/1 "2015-01-27T08:13:10Z")

</div>

Hello,

I want to be able to see exactly which terms are considered high frequency  
terms at a specific cutoff\_frequency.  
I noticed that if I query the termvectors of different documents with  
different routing values, the values of field\_statistics[doc\_count] and  
the term[doc\_freq] change.

That led me to the following questions:  
How is the document frequency calculated that is used for the  
cutoff\_frequency feature?  
Is the document frequency of terms calculated for the shard of its  
document, all shards of the index or all queried shards (routing) or which  
shards?  
Is the document frequency used in cutoff\_frequency calculated like  
term[doc\_freq] / field\_statistics[doc\_count], or differently?

How can I find the terms, that are high frequency terms at a given  
cutoff\_frequency?  
Is there a facet or aggregation query, that i could use?

Many thanks  
Dany

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/ecaba706-eb9a-4023-b887-200aa1d4a98f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ecaba706-eb9a-4023-b887-200aa1d4a98f%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 12:36am UTC](https://discuss.elastic.co/t/calculation-of-document-frequency-for-cutoff-frequency/21845/2 "2017-07-06T00:36:30Z")

</div>


