Reindex/Rotate best practices



What are the best practices (or other things to consider) when updating an index? To be more specific one option we're looking at is pointing our app to an alias and having an index attached to the alias. Then periodically creating a completely fresh index and swapping it into the alias and deleting the old index:

  1. Have an alias pointing to an index
  2. Create a new index
  3. Remove the index in (1) out of the alias
  4. Add the index created in (2) into the alias in (1).

The other alternative is to perform crud operations to the documents in the index which seems to me to be quite complex. However is it better practice than the four-step process I've described?

(Mark Walkom) #2

You're definitely on the right path with your aliases and it's the better option over just updating in situ.
You can also leverage Logstash to do the reindexing, eg

(Imran Siddique) #3

your proposal sounds reasonable. Leveraging aliases to hide physical indices being used for 'GET'/'SEARCH' scenario gives flexibility in migration/move.

(system) #4