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 rulinma <ru...@gmail.com> on 2014/08/01 11:22:34 UTC

why solr commit with serval docs

I use solrconfig.xml as follow:  
<updateHandler class="solr.DirectUpdateHandler2">
    <updateLog>
      <str name="dir">${solr.ulog.dir:}</str>
    </updateLog>
    <autoCommit> 
      <maxTime>15000</maxTime> 
	  <maxDocs>5000</maxDocs>
      <openSearcher>false</openSearcher> 
    </autoCommit>
    <autoSoftCommit> 
       <maxTime>3600000</maxTime> 
	   <maxDocs>500000</maxDocs>
    </autoSoftCommit>
  </updateHandler>

I use 2000 docs to commit once, but I query find that 2002,2003,2004 and so
on, not 2000,4000,6000 increase. I don't know why?
who can tell me ?
thanks!




--
View this message in context: http://lucene.472066.n3.nabble.com/why-solr-commit-with-serval-docs-tp4150583.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: why solr commit with serval docs

Posted by rulinma <ru...@gmail.com>.
code error by my colleague.



--
View this message in context: http://lucene.472066.n3.nabble.com/why-solr-commit-with-serval-docs-tp4150583p4151822.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: why solr commit with serval docs

Posted by Shawn Heisey <so...@elyograg.org>.
On 8/1/2014 3:22 AM, rulinma wrote:
> I use solrconfig.xml as follow:  
> <updateHandler class="solr.DirectUpdateHandler2">
>     <updateLog>
>       <str name="dir">${solr.ulog.dir:}</str>
>     </updateLog>
>     <autoCommit> 
>       <maxTime>15000</maxTime> 
> 	  <maxDocs>5000</maxDocs>
>       <openSearcher>false</openSearcher> 
>     </autoCommit>
>     <autoSoftCommit> 
>        <maxTime>3600000</maxTime> 
> 	   <maxDocs>500000</maxDocs>
>     </autoSoftCommit>
>   </updateHandler>
>
> I use 2000 docs to commit once, but I query find that 2002,2003,2004 and so
> on, not 2000,4000,6000 increase. I don't know why?
> who can tell me ?

I cannot say for sure, but I would guess that the commit action is
initiated when the threshold is crossed ... but that it is not an atomic
operation that stops indexing right at that moment.  I bet that it takes
a few microseconds or milliseconds for the commit to begin, and in the
meantime, a few more documents get indexed.

Thanks,
Shawn