# Terms aggregation on analyzed string field

**URL:** <https://discuss.elastic.co/t/terms-aggregation-on-analyzed-string-field/89078>\
**Category:** Elasticsearch\
**Created:** [June 12, 2017, 3:54pm UTC](https://discuss.elastic.co/t/terms-aggregation-on-analyzed-string-field/89078 "2017-06-12T15:54:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![joshi](https://avatars.discourse-cdn.com/v4/letter/j/ecc23a/32.png) [@joshi](https://discuss.elastic.co/u/joshi)\
**Post date:** [June 12, 2017, 3:54pm UTC](https://discuss.elastic.co/t/terms-aggregation-on-analyzed-string-field/89078/1 "2017-06-12T15:54:48Z")

</div>

I'm having trouble with mapping field in elasticsearch. The field is a string field with freetext. I want the field to be 'analyzed', and for the analyzed elements to be aggregatable.

The problem is when I load the data to elasticsaerch, the field shows as 'analyzed' but not 'aggregatable' in the kibana index settings screen.

I want to be able to aggregate the terms in the 'text' field, so i can build visualisations in kibana.

My mappings file:

```
{
  "dynamic": "true",
  "properties": {
    "username": {"type" : "keyword"},
    "date": {"type": "date", "format" : "yyyy-MM-dd HH:mm"},
    "text": {"type": "text","index" : "analyzed"}
    }
}
```

---

<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 10, 2017, 3:55pm UTC](https://discuss.elastic.co/t/terms-aggregation-on-analyzed-string-field/89078/2 "2017-07-10T15:55:03Z")

</div>

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