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 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.
For more options, visit https://groups.google.com/d/optout.