# Aggregation-keywords

**URL:** <https://discuss.elastic.co/t/aggregation-keywords/160300>\
**Category:** Elasticsearch\
**Created:** [December 11, 2018, 6:32am UTC](https://discuss.elastic.co/t/aggregation-keywords/160300 "2018-12-11T06:32:22Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 11, 2018, 6:52am UTC](https://discuss.elastic.co/t/aggregation-keywords/160300/2 "2018-12-11T06:52:49Z")

</div>

I guess you meant `terms` and `state.keyword`.

- `terms`: that's a terms aggregation: [https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-terms-aggregation.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-terms-aggregation.html)
- `state.keyword` is the field name you want to compute the terms aggregation on

If you are not defining any mapping in elasticsearch, then elasticsearch tries to automatically guess the mapping for you. If you sent a text within a `state` field, then elasticsearch created 2 fields behind the scene `state` and `state.keyword`. The former is more for full text search, the later more for computing aggregations, do sorting...

You can look at the mapping by doing:

```
GET /bank/_mapping
```

---

_[View the full topic](https://discuss.elastic.co/t/aggregation-keywords/160300)._
