# Kibana words histogram

**URL:** <https://discuss.elastic.co/t/kibana-words-histogram/44568>\
**Category:** Kibana\
**Created:** [March 16, 2016, 2:51pm UTC](https://discuss.elastic.co/t/kibana-words-histogram/44568 "2016-03-16T14:51:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ap5](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@ap5](https://discuss.elastic.co/u/ap5)\
**Post date:** [March 16, 2016, 2:51pm UTC](https://discuss.elastic.co/t/kibana-words-histogram/44568/1 "2016-03-16T14:51:02Z")

</div>

Hi ,

I have indexed several documents with several fields in ES and I am using Kibana to visualize it. One of them is text that is analyzed.

I would like to be able to get a histogram with the counts of the words, so not only being able to count in how many documents each of the words appears, but also how many times in total.

So say that the field with the text is this, and we have 2 documents:

text:{i am tired today today tired}  
text:{today i have to work}

i would get a graph where i see that today=3, tired=2 etc etc.

Thanks  
Ana

---

<div class="post-metadata">

**Author:** ![tbragin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tbragin/32/45166_2.png) [@tbragin](https://discuss.elastic.co/u/tbragin)\
**Post date:** [March 25, 2016, 4:17am UTC](https://discuss.elastic.co/t/kibana-words-histogram/44568/2 "2016-03-25T04:17:53Z")

</div>

I can't think of a way to do this in Kibana UI. The Terms aggregation returns only the number of documents that contain a given word, not the total number of words across those documents. In Elasticsearch itself, the Term Vectors API has a terms statistics option that will return total term frequencies across all documents: [https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-termvectors.html#\_term\_statistics](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-termvectors.html#_term_statistics)

You can use the Kibana Sense plugin to easily interact with ES APIs, if you haven't done it before:  
[https://www.elastic.co/guide/en/sense/current/installing.html](https://www.elastic.co/guide/en/sense/current/installing.html)

---

<div class="post-metadata">

**Author:** ![ap5](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@ap5](https://discuss.elastic.co/u/ap5)\
**Post date:** [March 25, 2016, 9:12am UTC](https://discuss.elastic.co/t/kibana-words-histogram/44568/3 "2016-03-25T09:12:08Z")

</div>

Thanks for the answer, I will try that.

---

<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, 1:57pm UTC](https://discuss.elastic.co/t/kibana-words-histogram/44568/4 "2017-07-06T13:57:46Z")

</div>


