# Change field type, don't need to reindex

**URL:** <https://discuss.elastic.co/t/change-field-type-dont-need-to-reindex/365710>\
**Category:** Elasticsearch\
**Created:** [August 28, 2024, 4:27pm UTC](https://discuss.elastic.co/t/change-field-type-dont-need-to-reindex/365710 "2024-08-28T16:27:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wmei](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wmei/32/88204_2.png) [@wmei](https://discuss.elastic.co/u/wmei)\
**Post date:** [August 28, 2024, 4:27pm UTC](https://discuss.elastic.co/t/change-field-type-dont-need-to-reindex/365710/1 "2024-08-28T16:27:58Z")

</div>

I have this field that I want to change to timestamp. I have no need to reindex the old data as the old data drops after 5 days. I am confused as instructions I have found involve a reindex.

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

Thanks!  
Wei

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [August 29, 2024, 5:24am UTC](https://discuss.elastic.co/t/change-field-type-dont-need-to-reindex/365710/2 "2024-08-29T05:24:14Z")

</div>

If you want to change and the mapping of a field (not add mapping) you can do so in the index template. This change will however only apply to new indices created after the change has been made. Indices that already exists will not be affected and a reindex is required to change the mapping in these. If you do not reindex old indices and just wait for them to age out you may see issues with queries until they age out as mappings will be inconsistent.

---

<div class="post-metadata">

**Author:** ![wmei](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wmei/32/88204_2.png) [@wmei](https://discuss.elastic.co/u/wmei)\
**Post date:** [August 29, 2024, 1:30pm UTC](https://discuss.elastic.co/t/change-field-type-dont-need-to-reindex/365710/3 "2024-08-29T13:30:36Z")

</div>

This is exactly what i am looking to do. I see the instructions to use the api. Do I just make a request with the body of this one change? Will it affect the current mappings already existing in the template?
