2
votes

I am trying to avoid frequent commits to my Solr repository so i have removed any explicit commits in my requests and I have set the autoCommit and autoSoftCommit as follows in solrconfig.xml:

 <autoSoftCommit> 
   <maxTime>60000</maxTime> 
 </autoSoftCommit>

 <autoCommit> 
   <maxTime>86400000</maxTime> 
   <openSearcher>false</openSearcher> 
 </autoCommit>

Essentially I am trying to softCommit every minute and hard commit once a day. But every time I issue update request I see that both the 'commits' and 'soft autocommits' keep increasing. I was expecting only 'soft autocommits' to increase at a higher rate and not 'commits'.

Moreover, 'autocommits' remains as 1 even though it has been 10 days since I restarted tomcat where I am running solr. I was expecting 'autocommits' to be 10 since I have set autocommit once a day.

I'd appreciate if someone could help.

1
"I see that both the 'commits' and 'soft autocommits' keep increasing"...how are you seeing these?jro
(1) Do you know all update routes, so that you can be sure that no one sends a commit? Say there is exactly one DataImporHandler and nothing else. If so, please show that update mechanism. (2) Do you have a Transaction Log configured?cheffe

1 Answers

0
votes

Auto-commit settings in the solrconfig.xml also have a maxDocs setting. Without checking the source I'm not sure of the exact default, but the standard example solrconfig.xml is set to 10,000 documents. It may be that your commits are being triggered on that setting.