Wayne Johnson
Wayne Johnson

Reputation: 31

Migrating from Solr 4.10.2 to Solr 6.0

I'm trying to migrate a Solr repository from 4.10.2 to 6.0.0. According to what I've read it should be possible to jump two major versions. However when I deploy a 6.0.0 system and replicate from a 4.10.2 master I get the following exception:

Caused by: org.apache.lucene.index.IndexFormatTooOldException: Format version is not supported
path="<path-to-data>\data\index\segments_3sq" 3 (needs to be between 4 and 6).
This version of Lucene only supports indexes created with release 5.0 and later.

For some reason it appears that our 4.10.2 repository -- built from scratch in a 4.10.2 environment -- contains a file name "segments_3sq" which is a version 3 file. This is too large of a jump (three versions) for the 6.0.0 installation to handle.

Why does the 4.10.2 environment contain a v3 file? Is there a way to re-build 4.10.2 w/out that file? The alternative would be to migrate to 5.5.1, and then do a second migration to 6.0, but I'd like to avoid two upgrade events if possible.

Upvotes: 2

Views: 2572

Answers (4)

fauguste
fauguste

Reputation: 399

To upgrade data file version, you can use solr upgrader tools : https://cwiki.apache.org/confluence/display/solr/IndexUpgrader+Tool

Upvotes: 0

Manish Nakar
Manish Nakar

Reputation: 4626

I have successfully upgraded my solr 4.10 to 6.3 ( solr 5.0 in between) with following steps

  1. Download solr5.0 and create all collections
  2. copy index data from 4.x to 5.0
  3. optimize all collections
  4. stop solr 5.0 and download and start solr 6.x
  5. create all collections in solr 6.x
  6. copy all index files from 5.0 to 6.x
  7. optimize all collections and you are ready

Happy coding

Upvotes: 1

Wayne Johnson
Wayne Johnson

Reputation: 31

Looking more closely at the error message:

This version of Lucene only supports indexes created with release 5.0 and later.

Apparently it's not possible to jump straight from 4.10.2 to 6.0, but we must take a detour through 5.5.1 first.

I found the following page Lucene 5.0.0 migration which does state that it's not possible to jump straight from 3.x to 5.x. It would have been nice for similar information to be included on the Lucene 6.0.0 migration page.

Upvotes: 1

nick_v1
nick_v1

Reputation: 1664

Lucene index files aren't upgraded when you upgrade Solr. The best way to resolve this is to re-index the data using a more recent version of Solr.

As a shot in the dark, you can also try optimization, not sure if it will work, but something worth looking into.

Upvotes: 0

Related Questions