Elasticsearch update index template
17,807
The template is only used at index creation. You'll have to modify your mapping or recreate your index and reindex your data.
You can use the PUT mapping API to modify your mapping.
Comments
-
kenticny almost 2 years
I have a question about elasticsearch index template, there is a scene of my question.
Create a template for a series indices, named
templateA
, and there are some indices create from this template, namedIndex-yyyy.mm.dd2
andIndex-yyyy.mm.dd2
. After a period of time, I need create some new fields in indice, and I update thetemplateA
.SO, How to make the previously created indices use the new template? please give me some suggestion. Thanks a lot!
-
kenticny almost 8 yearsThis answer is not very match my problem, but I didn't find a better answer! Thanks for the same.
-
Newerth over 7 yearsJust to clarify - even the template used to create the index can be updated, but you need to use the PUT mapping API (which is index related) instead of PUT index template API.