Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to upgrade from Solr 4.x directly to Solr 6.1?

We are looking to upgrade from SolrCloud 4.10.3 to SolrCloud 6.1. The documentation for Solr 6.1 is not very clear on backward compatibility.

I came across this post on the LucidWorks site.

The index format is backward compatible between two consecutive major Solr versions. So a Solr 3.x index is compatible with a Solr 4.x index. However if you have a Solr 1.x index and want to upgrade to Solr 4.x then you would need to first upgrade to Solr 3.x first.

It was written before Solr 6.x was out, and the wording of "between two consecutive major Solr versions" is unclear. The example skips the exact scenario that I'm interested in (skipping exactly 1 major version).

Do I have to first upgrade to Solr 5.x and then go to Solr 6.1?

like image 372
Luke Avatar asked Jun 23 '16 17:06

Luke


2 Answers

Since I face same situation on upgrading SOLR from 4.x to 6.x I have been lucky and found on git hub next script, that is making the upgrade:

https://github.com/cominvent/solr-tools.git/

All the credits goes to "cominvent" for this script. Since the folder cores vers 4.x structure is not same with version 6.x I have made a script that is creating the right tree configuration, then is applying upgradeindex.sh.

The script (buildsorltree.sh) can be found on https://github.com/cradules/bash_scripts and the repo dose have upgradeindex.sh too. Since I have linked this too scripts, I put them on same repo. Good luck!

like image 182
Constantin Radulescu Avatar answered Sep 30 '22 19:09

Constantin Radulescu


I was able to find this on the Apache website.

Solr 6 has no support for reading Lucene/Solr 4.x and earlier indexes. Be sure to run the Lucene IndexUpgrader included with Solr 5.5 if you might still have old 4x formatted segments in your index. Alternatively: fully optimize your index with Solr 5.5 to make sure it consists only of one up-to-date index segment.

So this means that you can upgrade directly, but only if you run the IndexUpgrader from Solr 5.5 first.

like image 42
Luke Avatar answered Sep 30 '22 17:09

Luke