# Terms aggregation on text

**URL:** <https://discuss.elastic.co/t/terms-aggregation-on-text/62458>\
**Category:** Elasticsearch\
**Created:** [October 7, 2016, 5:35am UTC](https://discuss.elastic.co/t/terms-aggregation-on-text/62458 "2016-10-07T05:35:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![NickW](https://avatars.discourse-cdn.com/v4/letter/n/8e7dd6/32.png) [@NickW](https://discuss.elastic.co/u/NickW)\
**Post date:** [October 7, 2016, 5:35am UTC](https://discuss.elastic.co/t/terms-aggregation-on-text/62458/1 "2016-10-07T05:35:18Z")

</div>

It looks like in v5 text fileds have `fielddata` disabled by default, and the new `*.keyword` field is not analyzed. So what is the best way to fetch the most frequent terms in an index or query result?

I'm trying to do a terms aggregation, something like the first example at [https://www.elastic.co/guide/en/elasticsearch/guide/current/aggregations-and-analysis.html](https://www.elastic.co/guide/en/elasticsearch/guide/current/aggregations-and-analysis.html) but it doesn't work for obvious reasons. Is there a workaround or another approach to finding popular terms?

---

<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 5, 2017, 10:14pm UTC](https://discuss.elastic.co/t/terms-aggregation-on-text/62458/2 "2017-07-05T22:14:08Z")

</div>


