Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Elasticsearch update index template

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, named Index-yyyy.mm.dd2 and Index-yyyy.mm.dd2. After a period of time, I need create some new fields in indice, and I update the templateA.

SO, How to make the previously created indices use the new template? please give me some suggestion. Thanks a lot!

like image 280
kenticny Avatar asked Jul 07 '16 06:07

kenticny


1 Answers

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.

like image 129
baudsp Avatar answered Sep 16 '22 11:09

baudsp