# Update fields of logstash index on ElasticSearch

**URL:** <https://discuss.elastic.co/t/update-fields-of-logstash-index-on-elasticsearch/47364>\
**Category:** Logstash\
**Created:** [April 14, 2016, 9:20am UTC](https://discuss.elastic.co/t/update-fields-of-logstash-index-on-elasticsearch/47364 "2016-04-14T09:20:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![oth1113](https://avatars.discourse-cdn.com/v4/letter/o/13edae/32.png) [@oth1113](https://discuss.elastic.co/u/oth1113)\
**Post date:** [April 14, 2016, 9:20am UTC](https://discuss.elastic.co/t/update-fields-of-logstash-index-on-elasticsearch/47364/1 "2016-04-14T09:20:13Z")

</div>

On ElasticSearch I have logstash index that are generated every day, I had changed the types of some of my fields, they had changed in the new indexes that was generated but not on the old index. Knowing that I can not delete my old indexs I want just the type of a field is changed on all existing indexs. I show you on the following picture: the default mapping by a former logstash index with the fields "TMP\_REPONSE" to string while it needs to be long, which is the case on the new index.

default mapping of an old index logstash:

 ![](https://us1.discourse-cdn.com/elastic/original/2X/f/f43bf8e94f1d043dca10aceaf933a18255a9c86f.PNG)

Thank you for showing me how I can solve this problem without removing the old indexs.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [April 14, 2016, 9:24am UTC](https://discuss.elastic.co/t/update-fields-of-logstash-index-on-elasticsearch/47364/2 "2016-04-14T09:24:30Z")

</div>

You have to reindex the old data. Details about how this can be done has been discussed here many times before, please check the archives.

---

<div class="post-metadata">

**Author:** ![oth1113](https://avatars.discourse-cdn.com/v4/letter/o/13edae/32.png) [@oth1113](https://discuss.elastic.co/u/oth1113)\
**Post date:** [April 14, 2016, 9:37am UTC](https://discuss.elastic.co/t/update-fields-of-logstash-index-on-elasticsearch/47364/3 "2016-04-14T09:37:27Z")

</div>

I searched a lot, and I understood where does the problem but I do not know how I can re-index the old data on a default mapping  
I want to be shown a little example on how to change the default mapping

---

<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:** [July 6, 2017, 5:02am UTC](https://discuss.elastic.co/t/update-fields-of-logstash-index-on-elasticsearch/47364/4 "2017-07-06T05:02:18Z")

</div>


