Frequency of significant terms in documents matching a query

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
To view this discussion on the web visit
For more options, visit