Can I modify analysis setting of an exist index?

I want to edit analyzer setting of an exist index to add a lowercase filter, should I rebuild the index? or there is someway easier.

thx~

For now there is nothing easier. You do a scroll query that hits all the documents and then re-add them to another index with the analysis setup the way you want so you don't have to rebuild from your source application - but only do that if your source application is slower.

If you don't have a source application - like if you are doing logging data or something, the normal practice is to add the change in analysis to the template for creating the next day/week/month's index and just live with the difference until your data retention period has you deleting the old indexes.

While I understand why modifying existing analyzers doesn't make sense, I'm curious why adding new ones requires closing and opening the index. I've skimmed through the code and couldn't find the answer. I suspected that maybe Lucene requires all analyzers to be defined when the IndexWriter is being instantiated but it's not the case. I'd appreciate any help with this :slight_smile:

It might have to do with the way analyzers are registered:

Ivan