I'm quite new to ElasticSearch, so please forgive me if I overlook something obvious/basic.
I'd like to change the settings of analyzers/tokenizers/filters, and then apply them to existing indices. The only way I can come up with is the following:
- create a new index.
- Suppose you want to change the setting of
postsindex, createposts-copyindex.
- Suppose you want to change the setting of
- reindex
poststoposts-copy. - delete
posts. - re-create
postsindex, applying the new settings. - re-reindex
posts-copytoposts. - delete
posts-copy.
I tried this way using Ruby client of ElasticSearch, and it looked like it worked. However, I'm not sure if this approach really is proper. And I feel like it's quite redundant and there might be more efficient way of applying new settings.
I would appreciate it if you shed some lights on this problem.
CodePudding user response:
It depends what type of changes are you doing on analyzers/tokenizers/filters, if you are changing it on existing fields than these are breaking changes and you have to recreate the indices with new settings(like you mentioned), but if you are adding a new fields in the index and for that you are creating new settings, than you don't have to recreate the index, its called incremental changes.
Hope this helps.
