I have a need to update my mappings and will therefore need to reindex -
but will be doing so directly from an existing ES index (I'm using ES as my
data store). I've read other posts, and think the following strategy will
work, but have a couple questions:
Here's the strategy:
1 - create new index with new mappings and different index name
2 - extract data from old index (e.g., using scroll)
3 - bulk load from old index into new index
4 - confirm consistency between indices (how do I do this?)
5 - add 'alias' to new index to map old index name to new index
6 - delete old index.
I have two questions regarding the strategy above:
1 - I'm not clear on how to confirm that the new index is fully consistent
with the old index. Any suggestions? Understood that I may need to halt
writes to the old index while the comparison is being performed.
2 - There will be a moment (however brief) where both the new index (with
the alias) and old index are getting requests. Once the alias is in place,
will search results against both indices create duplicates in the result
set (i.e., the same doc will show up twice)? If so - it might create
problems in my application. Probably a minimal concern - but I'd like to
hear whether anyone else has had issues "swapping" indices using the alias
functionality in this manner.
Many thanks in advance for your input.