# Update the "index" mapping parameter in the existing mapping

**URL:** https://discuss.elastic.co/t/update-the-index-mapping-parameter-in-the-existing-mapping/172070
**Category:** Elasticsearch
**Created:** [March 13, 2019, 6:57am UTC](https://discuss.elastic.co/t/update-the-index-mapping-parameter-in-the-existing-mapping/172070 "2019-03-13T06:57:23Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Praneet\_Khandelwal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/praneet_khandelwal/32/40565_2.png) [@Praneet\_Khandelwal](https://discuss.elastic.co/u/Praneet_Khandelwal)
#### Post date: [March 13, 2019, 6:57am UTC](https://discuss.elastic.co/t/update-the-index-mapping-parameter-in-the-existing-mapping/172070/1 "2019-03-13T06:57:23Z")

</div>

I have a field in my ES index with the following mapping:

```auto
"to": {
                    "index": false, 
                    "type": "text"
}

```

I would like to change the "index"parameter to True for this field. I guess this change would not be updated for the already existing documents in the index. So I am fine with the change happening for the documents that get indexed in future. Is there a way to do this? (I am thinking of pushing a changed template for my index pattern with the above change, but I am not sure if that would work.)

---

<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: [March 13, 2019, 6:58am UTC](https://discuss.elastic.co/t/update-the-index-mapping-parameter-in-the-existing-mapping/172070/2 "2019-03-13T06:58:35Z")

</div>

You can not change mappings in existing indices, so will need to reindex into a new index with the new, updated mapping to do that.

---

<div class="post-metadata">

### Author: ![Praneet\_Khandelwal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/praneet_khandelwal/32/40565_2.png) [@Praneet\_Khandelwal](https://discuss.elastic.co/u/Praneet_Khandelwal)
#### Post date: [March 13, 2019, 7:00am UTC](https://discuss.elastic.co/t/update-the-index-mapping-parameter-in-the-existing-mapping/172070/3 "2019-03-13T07:00:34Z")

</div>

@Christian_Dahlqvist  
Thanks for the reply.  
But I am not looking to change the mapping for the existing indices. I have new indices created on a daily basis. I want that the updated mapping atleast applies to the new indices that get created

---

<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: [March 13, 2019, 7:05am UTC](https://discuss.elastic.co/t/update-the-index-mapping-parameter-in-the-existing-mapping/172070/4 "2019-03-13T07:05:02Z")

</div>

Then you can create or change the index template.

---

<div class="post-metadata">

### Author: ![Praneet\_Khandelwal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/praneet_khandelwal/32/40565_2.png) [@Praneet\_Khandelwal](https://discuss.elastic.co/u/Praneet_Khandelwal)
#### Post date: [March 13, 2019, 7:07am UTC](https://discuss.elastic.co/t/update-the-index-mapping-parameter-in-the-existing-mapping/172070/5 "2019-03-13T07:07:33Z")

</div>

@Christian_Dahlqvist  
So after the updated template, the particular field will only be searchable in the new indices and not in the old ones , right ? I just want to make sure that when I apply a template to the entire index pattern(including the old and new indices), it does not create any error.

---

<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: [March 13, 2019, 8:20am UTC](https://discuss.elastic.co/t/update-the-index-mapping-parameter-in-the-existing-mapping/172070/6 "2019-03-13T08:20:04Z")

</div>

As mappings will be inconsistent I guess it could cause problems.

---

<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: [April 10, 2019, 8:20am UTC](https://discuss.elastic.co/t/update-the-index-mapping-parameter-in-the-existing-mapping/172070/7 "2019-04-10T08:20:06Z")

</div>

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