You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by shreejay <sh...@gmail.com> on 2012/12/17 02:18:55 UTC

Commit and OpenSearcher not working as expected.

Hello. 

I am running a commit on a solrCloud collection using a cron job. The
command is as follows:

aa.aa.aa.aa:8983/solr/ABCCollection/update?commit=true&opensearcher=false

But when i see the logs I see the the commit has been called with
openSearcher=true. 

The directupdatehandler2 in my solrconfig file looks like this:
/<updateHandler class="solr.DirectUpdateHandler2">

	<autoCommit>
    	<maxDocs>0</maxDocs>
    	<maxTime>0</maxTime>
  	</autoCommit>
    <autoSoftCommit> 
         <maxTime>0</maxTime> 
    </autoSoftCommit>
      
    <openSearcher>false</openSearcher>
    <waitSearcher>false</waitSearcher>  

    <updateLog>
      <str name="dir">${solr.data.dir:}</str>
    </updateLog>
   
  </updateHandler>/



And these are the logs :
http://pastebin.com/bGh2GRvx


I am not sure why openSearcher is being called. I am indexing a ton of
documents right now, and am not using search at all. Also read in the Wiki,
that keeping openSearcher=false is recommended for solrcloud.
http://wiki.apache.org/solr/SolrConfigXml#Update_Handler_Section


Is there some place else where openSearcher has to be set while calling a
commit? 


--Shreejay




--
View this message in context: http://lucene.472066.n3.nabble.com/Commit-and-OpenSearcher-not-working-as-expected-tp4027419.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Commit and OpenSearcher not working as expected.

Posted by shreejay <sh...@gmail.com>.
Ok this is very surprising. 

I just ran the curl command 

curl --silent
http://xx.xx.xx.xx:8985/solr/collectionABC/update/?commit=true&openSearcher=false

And on the solr log file I can see these messages:

/Dec 16, 2012 10:44:14 PM org.apache.solr.update.DirectUpdateHandler2 commit
INFO: start
commit{flags=0,_version_=0,optimize=false,openSearcher=true,waitSearcher=true,expungeDeletes=false,softCommit=false}
Dec 16, 2012 10:44:25 PM org.apache.solr.core.SolrDeletionPolicy onCommit
INFO: SolrDeletionPolicy.onCommit: commits:num=2
       
commit{dir=NRTCachingDirectory(org.apache.lucene.store.MMapDirectory@/opt/solrfolder/example/solr/collection1/data/index.20121215192222458
lockFactor/

*After the searcher is opened I see these:
*

/Dec 16, 2012 10:44:28 PM org.apache.solr.update.DirectUpdateHandler2 commit
INFO: end_commit_flush
Dec 16, 2012 10:44:28 PM org.apache.solr.update.processor.LogUpdateProcessor
finish
INFO: [resumesnew] webapp=/solr path=/update
params={waitSearcher=true&commit=true&commit_end_point=true&expungeDeletes=false&wt=javabin&softCommit=false&version=2}
{commit=} 0 14155/


I can see that openSearcher is still being called, because a new searcher is
created in the log files. I am not sure why it is being called? Does
solrCloud ignore openSearcher=false? 

--Shreejay
shreejay wrote
> Hi Mark, 
> 
> That was a typo in my post. I am using openSearcher only. But still see
> the same log files. 
> 
> /update/?commit=true&openSearcher=false





--
View this message in context: http://lucene.472066.n3.nabble.com/Commit-and-OpenSearcher-not-working-as-expected-tp4027419p4027462.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Commit and OpenSearcher not working as expected.

Posted by shreejay <sh...@gmail.com>.
Hi Mark, 

That was a typo in my post. I am using openSearcher only. But still see the
same log files. 

/update/?commit=true&openSearcher=false




--
View this message in context: http://lucene.472066.n3.nabble.com/Commit-and-OpenSearcher-not-working-as-expected-tp4027419p4027451.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Commit and OpenSearcher not working as expected.

Posted by Mark Miller <ma...@gmail.com>.
Try openSearcher instead?

- Mark

On Dec 16, 2012, at 8:18 PM, shreejay <sh...@gmail.com> wrote:

> Hello. 
> 
> I am running a commit on a solrCloud collection using a cron job. The
> command is as follows:
> 
> aa.aa.aa.aa:8983/solr/ABCCollection/update?commit=true&opensearcher=false
> 
> But when i see the logs I see the the commit has been called with
> openSearcher=true. 
> 
> The directupdatehandler2 in my solrconfig file looks like this:
> /<updateHandler class="solr.DirectUpdateHandler2">
> 
> 	<autoCommit>
>    	<maxDocs>0</maxDocs>
>    	<maxTime>0</maxTime>
>  	</autoCommit>
>    <autoSoftCommit> 
>         <maxTime>0</maxTime> 
>    </autoSoftCommit>
> 
>    <openSearcher>false</openSearcher>
>    <waitSearcher>false</waitSearcher>  
> 
>    <updateLog>
>      <str name="dir">${solr.data.dir:}</str>
>    </updateLog>
> 
>  </updateHandler>/
> 
> 
> 
> And these are the logs :
> http://pastebin.com/bGh2GRvx
> 
> 
> I am not sure why openSearcher is being called. I am indexing a ton of
> documents right now, and am not using search at all. Also read in the Wiki,
> that keeping openSearcher=false is recommended for solrcloud.
> http://wiki.apache.org/solr/SolrConfigXml#Update_Handler_Section
> 
> 
> Is there some place else where openSearcher has to be set while calling a
> commit? 
> 
> 
> --Shreejay
> 
> 
> 
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Commit-and-OpenSearcher-not-working-as-expected-tp4027419.html
> Sent from the Solr - User mailing list archive at Nabble.com.