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

后端 未结 2 1912
小蘑菇
小蘑菇 2021-02-12 11:45

Flyway is a very convenient schema migration/evolution tool in the RDBMS world. I\'m looking for something similar for ES.

Even though ES is different from RDBMS and I g

2条回答
  •  别那么骄傲
    2021-02-12 12:31

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

提交回复
热议问题