# Frequency of significant terms in documents matching a query

**URL:** <https://discuss.elastic.co/t/frequency-of-significant-terms-in-documents-matching-a-query/21245>\
**Category:** Elasticsearch\
**Created:** [December 14, 2014, 8:35am UTC](https://discuss.elastic.co/t/frequency-of-significant-terms-in-documents-matching-a-query/21245 "2014-12-14T08:35:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Graeme\_Pietersz](https://avatars.discourse-cdn.com/v4/letter/g/b9bd4f/32.png) [@Graeme\_Pietersz](https://discuss.elastic.co/u/Graeme_Pietersz)\
**Post date:** [December 14, 2014, 8:35am UTC](https://discuss.elastic.co/t/frequency-of-significant-terms-in-documents-matching-a-query/21245/1 "2014-12-14T08:35:45Z")

</div>

I understand how to use aggregations to get significant terms with counts  
of the number of documents in which they occur.

I would like to also be able to count the number of times these terms occur  
in across all documents. I can use term vectors to count how often a term  
occurs in a single document, but I cannot see how to to get the sum of  
occurrences in all documents matching a query, sorted by the number of  
occurrences - and I really need to get this for the significant terms  
(otherwise I will just get a list of common words).

--  
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/d98a16b6-1bca-4a3e-a99d-52391976c371%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d98a16b6-1bca-4a3e-a99d-52391976c371%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:43am UTC](https://discuss.elastic.co/t/frequency-of-significant-terms-in-documents-matching-a-query/21245/2 "2017-07-06T00:43:50Z")

</div>


