How do I manage schema/mapping migrations/evolutions in Elasticsearch?

For create-new-index-then-load-data-into-it-then-update-alias, what we do is:

  1. We use templates for the mapping
  2. And we use curator to create/update the index/alias automatically.

Still the curator has to be run periodically, but we run it in a cron job.


In 2020, there seems to be an easier approach: The reindex API. You only need to do

POST _reindex
{
  "source": {
    "index": "my-index-000001"
  },
  "dest": {
    "index": "my-new-index-000001"
  }
}

and the data gets re-indexed.

I am new to Elasticsearch so don't hesitate to point out where I can improve :)