# How to add keyword field on elasticsearch mapping

**URL:** https://discuss.elastic.co/t/how-to-add-keyword-field-on-elasticsearch-mapping/145627
**Category:** Elasticsearch
**Created:** [August 23, 2018, 1:16am UTC](https://discuss.elastic.co/t/how-to-add-keyword-field-on-elasticsearch-mapping/145627 "2018-08-23T01:16:58Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![bamboo2222](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@bamboo2222](https://discuss.elastic.co/u/bamboo2222)
#### Post date: [August 23, 2018, 1:16am UTC](https://discuss.elastic.co/t/how-to-add-keyword-field-on-elasticsearch-mapping/145627/1 "2018-08-23T01:16:58Z")

</div>

I want to do aggregation on text keyword field, but accidentally delete all keyword field of the index on Kibana. Can I fix this in the mapping by adding keyword field? Thanks!

---

<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: [September 20, 2018, 1:16am UTC](https://discuss.elastic.co/t/how-to-add-keyword-field-on-elasticsearch-mapping/145627/2 "2018-09-20T01:16:59Z")

</div>

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