# Count aggregation in kibana

**URL:** <https://discuss.elastic.co/t/count-aggregation-in-kibana/166865>\
**Category:** Elasticsearch\
**Created:** [February 3, 2019, 1:26pm UTC](https://discuss.elastic.co/t/count-aggregation-in-kibana/166865 "2019-02-03T13:26:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ninesalt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ninesalt/32/39981_2.png) [@ninesalt](https://discuss.elastic.co/u/ninesalt)\
**Post date:** [February 3, 2019, 1:26pm UTC](https://discuss.elastic.co/t/count-aggregation-in-kibana/166865/1 "2019-02-03T13:26:11Z")

</div>

I have a bunch of documents saved in elasticsearch and they have the below field.

`conjunctions: [and, and, and, ..]`

The field is saved as `conjunctions` and `conjunctions.keyword` and according to the index pattern page in Kibana, only `conjunctions.keyword` can be used in aggregation.

I'm trying to use Kibana to visualize the most commonly occurring words in that field (in the whole index). I can't get it to actually count the occurrences. It seems to be counting the number of documents instead that have each word instead. So if I have 2 documents that each contain 1000 occurrences of `and` , the chart Kibana generates shows `and: 2` .

Is this because of the keyword datatype? If not, what is happening?

---

<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:** [March 3, 2019, 1:26pm UTC](https://discuss.elastic.co/t/count-aggregation-in-kibana/166865/2 "2019-03-03T13:26:14Z")

</div>

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