How to soft-commit in Sunspot (Solr 4)? - solr

Sunspot.commit will do hard-commit. How can I issue a soft-commit command against the Solr 4 server?
Soft commits are less expensive and they make use of the NRT feature of Solr 4.

I couldn't find soft commits feature in sunspot. I have added this functionality and created a pull request against the sunspot main repository.

Related

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.

Solr instance for sitecore 7

I am trying to implement solr into sitecore but could not find any way for creating a Solr instance for the same. I have few PDFs from SDN I could find any way to create Solr instance in any. Considering that I am new to CMS I hope I could get some help here. Thank you
There are lots of resources available for setting up Solr, and integrating Sitecore.
Essentially Sitecore is ignorant with respects to how you setup Solr (barring a few exceptions), so you need to follow standard methods to set Solr up. If you are doing this on your local machine, then I recommend you simply download Solr and get it running through the provided Jetty App Server.
Once Solr is running, download the Solr Extensions from SDN, then follow the search scaling guide to integrate Solr. This really only boils down to the following;
Remove Lucene config files
Add Solr config files and binaries
Add Solr endpoint into relevant config
Generate Solr Schema via Sitecore -> Control Panel -> Search (within Sitecore)
Add Schema file to Solr Core configuration
et voila
There is a great guide here: http://www.dansolovay.com/2013/05/setting-up-solr-with-sitecore-7.html

Testing SOLR to Elasticsearch data transfer

I have recently moved my entire SOLR documents into Elasticsearch after creating an exact equivalent mapping of the schema.xml . To test the accuracy, i created about 120 lucene queries and queried it on SOLR and elasticsearch.
However on testing the hitcounts for 17/120 queries differed between SOLR and elasticsearch.Could there be any reasons for this apart from the analyzers, tokenizers, filters defined in schema.xml/ elasticsearch mappings. The SOLR version is 4.3.0 whereas the elasticsearch version is 1.3.2
The elasticsearch query i used is :
{"query_string":{"query":lucene_query}}
Please let me know, if there is any alternative way to test the query accuracy between SOLR and Elasticsearch.
First, make sure that you are using the same semantics. For example, same filters, tokenizers, stemmers.
Also, Apache Solr 4.3.0 is built on Apache Lucene 4.3.0 , while ElasticSearch 1.3.2 is built on Apache Lucene 4.9.0
This might not be the issue, I don't know to be honest. But if I were you, I would check the release notes of Apache Lucene > 4.3.0 and see what is changed.

commit in solr 4.0 takes longer time compared to solr 3.6

I have recently migrated from solr 3.6 to solr 4.0. The documents in my core are getting constantly updated and so I fire a code commit after every 10 thousand docs . However moving from 3.6 to 4.0 I have noticed that for the same core size it takes about twice the time to commit in solr4.0 compared to solr 3.6.
Is there any workaround by which I can reduce this time. Any help would be highly appreciated
Solr 4 has transaction logging enabled by default. If you don't need that, you can disable this option. I would provide a link, but the Solr Wiki is currently down for maintenance.

How to enable realtime search in Solr 4.0

I’m trying to enable realtime search in Solr 4.0 (So I can see new documents without committing).
I’ve added:
<realtime visible="0" facet="true">true</realtime>
But documents aren’t seen before commit (or softCommit).
Any help will be appreciated.
I believe this feature is only available in Solr RA but any information on how to achieve it will be great.
Thanks,
Avner
As far as my understanding this can't be done in Solr 4.0 but only in Solr-ra http://solr-ra.tgels.com
Solr 4.0 has the soft commit feature which helps with NRT search requirements.
It has a new feature which supports the get operation without commit by enabling logged update but without the search capabilities.

Resources