Total Count of a word from multiple documents (should not count only once but number of times it is present)

Using elasticsearch, I can be able to see the count of documents containing a specific word using 'terms' aggregation and then 'filter' the word. But, I want something like

Doc 1 - text text text good
Doc 2 - good one

then count of words as:

text - 3
good - 2
one - 1

But, not like:

text - 1
good - 1
One - 1

I have used tika, fscrawler and presently working on ingest-attachment, am not sure that will help me either. Can anyone tell that is count of words even possible using elasticsearch.

Thanks in advance.

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