0

I have copy of old data i.e. Elasticsearch 1.x, I want to migrate or reindex in Elasticsearch 5.x.

what are the methods and better way to do this ?

Mysterion
  • 9,050
  • 3
  • 30
  • 52
Dhairya
  • 743
  • 2
  • 11
  • 29

1 Answers1

2

Elasticsearch is able to use indices created in the previous major version only. For instance, Elasticsearch 5.x can use indices created in Elasticsearch 2.x, but not those created in Elasticsearch 1.x or before.

If you are running an Elasticsearch 2.x cluster which contains indices that were created before 2.x, you will either need to delete those old indices or to reindex them before upgrading to 5.x. See Reindex in place.

If you are running an Elasticsearch 1.x cluster, you have two options:

First upgrade to Elasticsearch 2.4.x, reindex the old indices, then upgrade to 5.x.

I would recommend to follow official guide from Elasticsearch by looking here - https://www.elastic.co/guide/en/elasticsearch/reference/current/reindex-upgrade.html#reindex-upgrade-remote, which should help you.

Mysterion
  • 9,050
  • 3
  • 30
  • 52
  • I write a sandbox in python to take data from 1.x and directly put in 5.x, so its automatically re indexed.... Thanks. above solution is also helpful.. – Dhairya Nov 16 '16 at 07:48
  • @Dhairya Can you please help me out with the sandbox which you have written in python ? – Jakki Nov 21 '17 at 18:13
  • I created that sandbox year ago... but I will definately try to find it on weekend... Just try to create python script that will read indices from ES1.X then write it into ES2.x, Then ES2.X to ES5..... – Dhairya Nov 22 '17 at 06:39