Sitecore and SolrCloud switch on rebuild - solr

As you may already know that Sitecore, configured to work with SolrCloud, does not support index switch on rebuild. Is there a way to achieve this with version 4.10.3 of Solr and Sitecore 8.0?
We found a link - https://github.com/SitecoreSupport/Sitecore.Support.449298 - but this has only been tested from version 5.2.1 to 5.5.1. Does anyone have any experience implementing this for version 4.10.3? Any issues that we may need to be aware of?
Thanks

This patch was created as the old SwitchOnRebuild used the Solr Core switching API which is now deprecated in version 5.* and above. It was not recommended when running in SolrCloud mode due to an issue with Zookeeper.
This code uses the Solr 'collections' API (/solr/admin/collections?action=LIST) instead , you would need to check if this API is available for Solr 4.10 (I think it is but I'm not 100% sure)
You would then just need to ignore the parts about the schemaFactory as that is Solr 5.* specific.
Note that this patch relies on the 405677 patch to be applied too.

Related

Latest stable version of solr

solr
Now i am using solr4. I need to migrate solr to latest version.
Which solr version is latest and stable?
What are the conditions i need to check for migration?
How can i merge this version to latest version?
Which version can u prefer for me?
any migration tool is available for this migration?
I think about solr 6.3.0
Is it stable ?
What are the manger difference in solr 4 and 6 ??
When upgrading you really have to choices:
Reindex. This is the easiest (and you should have a way to reindex on request anyway, but some use cases makes reindexing hard, since Solr could be your primary datastore), most flexible and gives you the best end result.
Do a version-by-version upgrade, going from each version that supports the old index format to the most recent version that supports that format, then repeat until you're on your target version of Solr. Since old index versions are usually readable through each main version tree (I think), you'll have to go 4 -> 5 -> 6. You can use the IndexUpgrader tool to help with this, and as you can see at the bottom of that page, Jan made a tool that automates 4 -> 5 -> 6 for you.
The differences are far too many to really list, please refer to the Changelog for each release. In particular there's a world of difference regarding cloud / cluster support between 4.x and 6.x, and there's a lot of new features, such as streaming expressions.
Upgrading the schema is a matter of going through the datatypes you're using and checking if they've changed definitions (ints vs tries, for example). You'll probably be OK with just minor changes. The default schema factory has changed from the classic index schema to the managed schema, so if you want to keep editing the schema.xml as you're used to, you'll have to change to the ClassicIndexSchemaFactory in your configuration.

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?
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!
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.

What will be the issues upgrading from Solr 3.6.0 to 4.x or 5.x?

I’ve inherited a project that uses a Solr 3.6.0 deployment. (Several
masters and several slaves – I think there are 6 Solr instances in total.)
I’ve been tasked with investigating if upgrading our 3.6.0 deployment will improve performance – there’s a lot of data and things are getting slow, apparently.
I’ve read Apache docs that from 3.6.x to 4.x there were improvements in scalability and performance.
I see that from 4.x to 5.x that Solr is now a standable server and no longer just a WAR running on Tomcat.
ISSUES:
A. Is it worth upgrading to 4.x or 5.x? Will I see a big improvement in performance?
B. Should I got to 4.x or 5.x? Will 4.x be an easier upgrade path since it's just a new WAR file?
C. In a nutshell ... what will the upgrade path look like, what kind of steps am I in for, and how can I avoid trouble?
Any help is GREATLY appreciated!!
It depends.
If stuff runs fine today and you don't need the extra performance or functionality - there is no good reason to touch it. You're so far behind that upgrading will be a large thing anyway. If you need the performance or the functionality, yes. It's worth it. You'll see an increase in performance and you can use a more recent Java version (current trunk of Lucene requires Java8).
If you can't reindex easily, you'll have to go through 4.x to get to 5.x anyway, since the current version of 5.x might not be able to read your current index format. If you can reindex easily, go directly to 5.x. You'll have to deal with the change in how Solr is being run at some time, better do it now when you're doing the breaking upgrade anyways.
Have a backup, replicate the current environment to a experimental server and try the update there. If you can easily reindex, set up 5.x and index to it and see if you can run the application straight from that backend instead (in development, not production). If it works (and you can reindex easily), create a Solr 5.x instance to run in parallel to your current installation, reindex to that and switch over production after confirming that it works in dev.
If you can't reindex, create a development clone of the current core and try to find the upgrade path that is able to upgrade the index files as you're going along. You're going to have to read a bit of documentation and try out different versions to get a proper migration of the index file format going.

Mahout & Lucene Version Compatibility

I am trying to use Mahout to do some analysis on the term vectors stored in my Solr/Lucene index. Unfortunately, it seems that the latest Mahout release is behind the latest Solr/Lucene release.
My Solr/Lucene installation is 4.10.3. As far as I can tell, the latest Mahout release (1.0) expects Lucene indexes at version 4.6.1.
When I run mahout lucene.vector I get the error:
Exception in thread "main" org.apache.lucene.index.IndexFormatTooNewException: Format version is not supported (resource: MMapIndexInput(path="/path/to/data/index/segments.gen")): -3 (needs to be between -2 and -2)
I have tried two things so far to tackle this problem:
First, I edited my solrconfig.xml file to say:
<luceneMatchVersion>4.6.1</luceneMatchVersion>
delete my indexed data, and built a clean index from the original documents. This has done nothing to fix the error.
So secondly, I tried to change the lucene.version in the Mahout pom.xml file to 4.10.3 and recompile the binary to see if the capabilities had been added yet. I knew this was unlikely to work, but tried anyway.
My question is, how do I appropriately change the Lucene version that Solr uses for writing index files if it is not the above luceneMatchVersion setting in solrconfig.xml?
Mahout seems to support Solr 3.x for now. You may try this patch for mahout.

What are the differences between Solr 3.6.2 and Solr 4.0?

Are there any major differences between Solr 3.6 and Solr 4.0 other than new features? Am I safe using my existing queries (those that work in Solr 3.6) inside of Solr 4.0?
Are there any major differences between Solr 3.6 and Solr 4.0 other
than new features?
I find this question weird, least to say. Bug fixes and new features are the whole point of releases!
You can look at the full changelog of the Solr release which is a available here. Don't forget that Solr and Lucene are released in unison so you also need to look for relevant changes in both projects.
Am I safe using my existing queries (those that work in Solr 3.6)
inside of Solr 4.0?
Queries should be fine, but indices - probably not. Quoting javanna from another SO post:
The index format has changed, but Solr will take care of upgrading the
index. That happens automatically once you start Solr with your old
index. But after that the index cannot be read anymore by a previous
Solr/lucene version.
Ideally they should work.
You can probably check the Changes.txt which would give an idea of all the new features, Changes, Bug fixes, Optimization done.
If any things breaks, you can always refer to the Changes to check if any related has been changed.

Resources