Reindex to change analyzer not working

I have written a piece of code, on top of reindex functionality provided by ElasticSearch.
The code takes an alias name and searches for the linked index.
Let's say alias name is x then index name is x_v1.
Later it creates index x_v2 (with updated analyzer) and call reindex to index data from x_v1 to x_v2.
Then it deletes x_v1 after linking x_v2 to alias x.

Now when I am checking the metadata of x_v2, it has updated analyzer. But when I am actually querying the data it is searching according to the previous analyzer.

I am doing anything wrong?

Based on the description you've written here, I can't see what is wrong. Maybe add in your code (or link to it)? I do something similar to this in an open source project, without problem (doesn't use the reindex API, but the aliasing pattern is the same).

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.