0

I did an upgrade of my elasticsearch instance from elasticsearch-2.x to elasticearch-5.6 . Everything seems to work fine. But before i do an upgrade to version 6, I have to reindex data. Whats does reindexing mean?

I have a script that is creating all data i need on elasticsearch. Do i have to start this script. But in this case it would be the same like i would remove all indices and install all dumps back into elasticsearch.

I dont know how to try this because i dont know the "right way" to do it.

EDIT I did now found the api with _reindex post. Do i have to do this for all indexes i have or is there an application i don't know that is doing this maybe faster than me :-)

hukachaka
  • 63
  • 1
  • 6
  • 2
    What's your specific programming question? – G_V Jan 29 '18 at 14:18
  • i dont have a specific programming question. I just want to know what "reindexing" means in particular. I am still not sure if it is correct what i understood: Creating new index, import analyzer and mapping, _reindex from one index to another with _reindex API. Is this correct? – hukachaka Jan 30 '18 at 07:37
  • In that case, you want the superuser stackexchange. This is the programming one. https://superuser.com/tour – G_V Jan 30 '18 at 08:12
  • @G_V thank you very much :-) – hukachaka Mar 10 '18 at 10:51

1 Answers1

0

First, why is this necessary: Behind the scenes Apache Lucene is writing the data. Lucene can always write its current version and read the previous one.

  • Elasticsearch 2.x == Lucene 5
  • Elasticsearch 5.x == Lucene 6
  • Elasticsearch 6.x == Lucene 7

If you have upgraded from 2.x, you need to make sure that all the data has been written with Lucene 6 before you can upgrade to Elasticsearch 6.x. You can actually check this in the version information of all the Lucene segments with GET /_segments (this might give you a lot of information).

What you want to run to get this done is the reindex in place. And I can highly recommend the free X-Pack Basic migration assistant to make sure you have upgraded all indices and don't have any other hidden upgrade problems.

xeraa
  • 10,456
  • 3
  • 33
  • 66