Having issues in Soft Auto commit (Near Real Time). Am using solr 4.3 on tomcat . The index size is 10.95 GB. With this configuration it takes more than 60 seconds to return the indexed document. When adding documents to solr and searching after soft commit time, its returning 0 hits. Its taking long before the document actually starts showing up, even more than the autoCommit interval.
<autoCommit>
<maxTime>15000</maxTime>
<openSearcher>false</openSearcher>
</autoCommit>
<autoSoftCommit>
<maxTime>1000</maxTime>
</autoSoftCommit>
Machine is ubuntu 13 / 4 cores / 16GB RAM. Given 6gb to Solr running over tomcat.
Can somebody help me with this?
If you are adding new document using solr client, try using commitWithin, its more flexible over autoSoftCommit.One more thing make sure the u have update log is enabled in solrconfig.xml and get handler as well.You can get more details here-http://wiki.apache.org/solr/NearRealtimeSearch
Related
I am upgrading my Java program from Solr 7.4 to Solr 8.11.1 (same upgrade for SolrJ). It does not use SolrCloud.
I did not change the code base because the upgrade guide reads :
If you are not using Solr in SolrCloud mode (you use Standalone Mode instead), we expect you can upgrade to Solr 8 from any 7.x version without major issues.
However the old index is never updated (its contents does not change). I know it is recommended to reindex when upgrading to a new major version, and if I do so on a 2 document index I get the expected contents. But as it took weeks to process and index the actual data some years ago I'd rather avoid reindexing if it is possible!
I also tried to apply the upgrader tool with and without -delete-prior-commits and although it ran smoothly the old index did not get updated afterwards when used in my program.
My test index has 2 documents in it. During the index update in my program I do a deleteById(coreName,listOfDocIdsToBeRemoved) on a SolrClient which returns {responseHeader={status=0,QTime=1}} and just afterwards I do a commit(coreName) on the same SolrClient which returns {responseHeader={status=0,QTime=23}}.
Following the commit if I run mySolrClient.query(coreName,new SolrQuery("*:*")).getResults().getNumFound();, I still get 2 documents whereas it should be 0 (the expected result I get when doing a full reindex). So it looks like the old index is read only (although file permissions are the same compared to the full reindexed version of the index).
If I log to the Solr Admin dashboard, the core overview reads (the version keeps increasing as expected as the last modified field gets updated) :
Last Modified:
3 minutes ago
Num Docs:
2
Max Doc:
2
Heap Memory Usage:
2452
Deleted Docs:
0
Version:
56
Segment Count:
1
Current: V
Finally my question is : Can I still upgrade Solr from 7.4 to 8.11 and use the old index without fully reindexing or is it just impossible without fully reindexing ?
Please note : when doing a full reindex I use the old solrconfig.xml file in which I only update the luceneMatchVersion tag and I use the same managed-schema file.
How does a Solr CDCR target cluster handle commits? The commit settings are the same as on the CDCR source, where the Solr admin UI shows freshly indexed documents with hardly any delay. Both settings are
<autoCommit>
<maxTime>${solr.autoCommit.maxTime:15000}</maxTime>
<openSearcher>false</openSearcher>
</autoCommit>
<autoSoftCommit>
<maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime>
</autoSoftCommit>
with the ${solr*maxTime} unset as far as I can tell. (I am a bit surprised anyway, given the settings, that I see results shortly after indexing on the source cluster:-(
Yet on the target cluster, I seem to never get a commit, certainly not within 15 seconds as the default suggests. I know the data is available, since it appears right after a manual commit.
Any idea how to configure the target to actually perform any commits?
I was facing same issue. Adding softcommit to 15s helped me:
curl -X POST -H 'Content-type: application/json' -d '{"set-property":{"updateHandler.autoSoftCommit.maxTime":1500}}' http://localhost:8983/solr/<yourcollection>/config
I found in some forum hint to restart server, did not help me.
I am using SOLR with sitecore, on production environment, I am getting a lot of errors in SOLR log, but sites are working fine, I have 32 solr cores, and I am using Solr version 4.10.3.0 with Sitecore 8.1 update 2, below is sample of these errors, any one can explain to me these errors :
Most of the errors are self-descriptive, like this one:
undefined field: "Reckless"
tells that the field in question is not defined in the solr schema. Try to analyze the queries you system is accepting and the system sending these in.
The less obvious one:
Overlapping onDeckSearchers=2
is warning about warming searchers, in this case 2 of them concurrently. This means, that there were commits to the Solr index in a quick succession, each of which triggered a warming searcher. The reason it is wasteful is that even though the first searcher has warmed up and is ready to serve queries, it will be thrown away as the new searcher warms up and is ready to serve.
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.
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.