# Reindex to change analyzer not working

**URL:** <https://discuss.elastic.co/t/reindex-to-change-analyzer-not-working/145411>\
**Category:** Elasticsearch\
**Created:** [August 21, 2018, 2:43pm UTC](https://discuss.elastic.co/t/reindex-to-change-analyzer-not-working/145411 "2018-08-21T14:43:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rishabh644](https://avatars.discourse-cdn.com/v4/letter/r/f475e1/32.png) [@rishabh644](https://discuss.elastic.co/u/rishabh644)\
**Post date:** [August 21, 2018, 2:43pm UTC](https://discuss.elastic.co/t/reindex-to-change-analyzer-not-working/145411/1 "2018-08-21T14:43:19Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![jaddison](https://avatars.discourse-cdn.com/v4/letter/j/e5b9ba/32.png) [@jaddison](https://discuss.elastic.co/u/jaddison)\
**Post date:** [September 9, 2018, 10:56pm UTC](https://discuss.elastic.co/t/reindex-to-change-analyzer-not-working/145411/2 "2018-09-09T22:56:09Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 7, 2018, 10:56pm UTC](https://discuss.elastic.co/t/reindex-to-change-analyzer-not-working/145411/3 "2018-10-07T22:56:12Z")

</div>

Closed on October 7, 2018, 10:56pm UTC

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