Update the "index" mapping parameter in the existing mapping

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

"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.)

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.

@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

Then you can create or change the index template.

@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.

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

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