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

**URL:** <https://discuss.elastic.co/t/total-count-of-a-word-from-multiple-documents-should-not-count-only-once-but-number-of-times-it-is-present/117662>\
**Category:** Elasticsearch\
**Created:** [January 30, 2018, 4:37pm UTC](https://discuss.elastic.co/t/total-count-of-a-word-from-multiple-documents-should-not-count-only-once-but-number-of-times-it-is-present/117662 "2018-01-30T16:37:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![manasguduri](https://avatars.discourse-cdn.com/v4/letter/m/50afbb/32.png) [@manasguduri](https://discuss.elastic.co/u/manasguduri)\
**Post date:** [January 30, 2018, 4:37pm UTC](https://discuss.elastic.co/t/total-count-of-a-word-from-multiple-documents-should-not-count-only-once-but-number-of-times-it-is-present/117662/1 "2018-01-30T16:37:03Z")

</div>

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.

---

<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:** [February 27, 2018, 4:37pm UTC](https://discuss.elastic.co/t/total-count-of-a-word-from-multiple-documents-should-not-count-only-once-but-number-of-times-it-is-present/117662/2 "2018-02-27T16:37:23Z")

</div>

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