Home > Net >  Elastic Search: applying changes of analyzers/tokenizers/filters settings to existing indices
Elastic Search: applying changes of analyzers/tokenizers/filters settings to existing indices

Time:01-09

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:

  1. create a new index.
    • Suppose you want to change the setting of posts index, create posts-copy index.
  2. reindex posts to posts-copy.
  3. delete posts.
  4. re-create posts index, applying the new settings.
  5. re-reindex posts-copy to posts.
  6. 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.

  • Related