# How can I change data type of a field in Filebeat index

**URL:** <https://discuss.elastic.co/t/how-can-i-change-data-type-of-a-field-in-filebeat-index/363946>\
**Category:** Kibana\
**Created:** [July 29, 2024, 5:47am UTC](https://discuss.elastic.co/t/how-can-i-change-data-type-of-a-field-in-filebeat-index/363946 "2024-07-29T05:47:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mahnaz\_Haghighi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mahnaz_haghighi/32/123276_2.png) [@Mahnaz\_Haghighi](https://discuss.elastic.co/u/Mahnaz_Haghighi)\
**Post date:** [July 29, 2024, 5:47am UTC](https://discuss.elastic.co/t/how-can-i-change-data-type-of-a-field-in-filebeat-index/363946/1 "2024-07-29T05:47:48Z")

</div>

Hi.I have a string field in my Filebeat index. When I want to make a visualization with that field I cant find it in list of terms. How can I make it aggregatable?

---

<div class="post-metadata">

**Author:** ![ashishtiwari1993](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ashishtiwari1993/32/135241_2.png) [@ashishtiwari1993](https://discuss.elastic.co/u/ashishtiwari1993)\
**Post date:** [July 29, 2024, 7:14am UTC](https://discuss.elastic.co/t/how-can-i-change-data-type-of-a-field-in-filebeat-index/363946/2 "2024-07-29T07:14:10Z")

</div>

Hi @Mahnaz_Haghighi, Welcome to the Elastic Community.

You can come up with custom fields and load [in template](https://www.elastic.co/guide/en/beats/filebeat/current/configuration-template.html). Also you can append custom field with custom mapping.

```auto
setup.template.overwrite: true
setup.template.append_fields:
- name: test.name
  type: keyword
- name: test.hostname
  type: long

```

---

<div class="post-metadata">

**Author:** ![Mahnaz\_Haghighi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mahnaz_haghighi/32/123276_2.png) [@Mahnaz\_Haghighi](https://discuss.elastic.co/u/Mahnaz_Haghighi)\
**Post date:** [July 30, 2024, 6:42am UTC](https://discuss.elastic.co/t/how-can-i-change-data-type-of-a-field-in-filebeat-index/363946/3 "2024-07-30T06:42:18Z")

</div>

tanks a lot. I do it and it works.
