Upgrading indexes from 0.2 to 2.1.1

Hi,

I am trying to upgrade a local instance of ES from version 0.2 to 2.1.1. Yes I know this is a pretty big jump. This is what happens when you stay out of the loop for a couple of years.

As far as I understand, the process is pretty simple. This is what I've done:

  • Make a back up of my data directory
  • Install and run ES 1.7.4
  • Upgrade each index individually by running POST to indexname/_upgrade
  • Verify nothing else needs to be upgraded by running GET to _upgrade (each index displays number of bytes that need upgrading as 0)
  • Install and run ES 2.1.1
  • I receive the following error:

The index [policies] was created before v0.90.0 and wasn't upgraded. This index should be open using a version before 2.0.0 and upgraded using the upgrade API

Note that I used the following documentation to upgrade my indices: https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-upgrade.html

Any ideas why the upgrade process failed? How can I check which version each of my indicies is at?

I guess that policies is one of the indices you manually ran _upgrade on, right?
And nothing appeared in logs?

I would probably open an issue about this.

Yes policies is one of the indices I upgraded. I have 11 indices in total. I upgraded them all individually. When I start 2.1.1 I get that error above for just two indices (enquiries and policies) and the error appears twice for both for some reason.

I think you should open an issue then...

I've raised the issue here: https://github.com/elastic/elasticsearch/issues/18591

0.2? Wow. Perhaps you meant 0.20? 0.2 would have been very very early. :slight_smile:

After upgrading to 1.x, try doing a forced merge down to one segment.
Perhaps some segments are still old. Since Lucene segments are immutable, a
forced merge will create a new Lucene 4 segment out of the old segments.

Ivan

Yes, I meant 0.20, not 0.2. It seems unfortunately that 1.7 does not support the forced merge operation.