# How aggregatable fields are defined in Kibana

**URL:** <https://discuss.elastic.co/t/how-aggregatable-fields-are-defined-in-kibana/219957>\
**Category:** Kibana\
**Created:** [February 19, 2020, 12:05pm UTC](https://discuss.elastic.co/t/how-aggregatable-fields-are-defined-in-kibana/219957 "2020-02-19T12:05:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexandros888](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Alexandros888](https://discuss.elastic.co/u/Alexandros888)\
**Post date:** [February 19, 2020, 12:05pm UTC](https://discuss.elastic.co/t/how-aggregatable-fields-are-defined-in-kibana/219957/1 "2020-02-19T12:05:34Z")

</div>

Hello i created an index and i saw that even some string or boolean fields are aggregatable.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/9/09606614cfc8cdcabf029b935a7cf617fcca5e96.png)

That helped a lot because i created aggs during alert creation even on those string and boolean fields.

My question is the following:

When an index is created how you can specify from the beginning which fields to be aggregatable so that you can use the aggs function later on them when you create alerts?

---

<div class="post-metadata">

**Author:** ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)\
**Post date:** [February 19, 2020, 4:00pm UTC](https://discuss.elastic.co/t/how-aggregatable-fields-are-defined-in-kibana/219957/2 "2020-02-19T16:00:52Z")

</div>

`Keyword` fields are aggregatable by default, but `text` fields are not. It maps to whether the field uses [doc\_values](https://www.elastic.co/guide/en/elasticsearch/reference/current/doc-values.html) which is how keyword fields work

---

<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 18, 2020, 4:15pm UTC](https://discuss.elastic.co/t/how-aggregatable-fields-are-defined-in-kibana/219957/3 "2020-03-18T16:15:08Z")

</div>

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