On 11/23/21 8:31 AM, Dan Rosher wrote:
It seems to me that <openSearcher>false</openSearcher> is not being
honored, or does a softCommit always happen on an autoCommit?

Cache reloads seems to coincide with solr.autoCommit.maxTime:

We have the following solrconfig snippet:

     <autoCommit>
       <maxTime>${solr.autoCommit.maxTime:15000}</maxTime>
       <openSearcher>false</openSearcher>
     </autoCommit>

     <autoSoftCommit>
       <maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime>
     </autoSoftCommit>

The autoCommit, if it fires, is always a hard commit.  If you see a soft commit, it did NOT come from autoCommit.

021-11-23 15:10:38.976 INFO  (commitScheduler-643-thread-1) [   ]
o.a.s.u.DirectUpdateHandler2 start
commit{,optimize=false,openSearcher=true,waitSearcher=true,expungeDeletes=false,softCommit=true,prepareCommit=false}

This is a soft commit.  It was NOT fired by autoCommit.  It looks like it was either fired by autoSoftCommit or by a commitWithin parameter on an update request.  If you have not defined the system property named "solr.autoSoftCommit.maxTime" when Solr starts, then I think it was most likely commitWithin.  Note that if you use the "Documents" tab in the admin UI to send documents for indexing, it has a "Commit Within" box that defaults to 1 second, and the value entered there is sent as a commitWithin parameter.

2021-11-23 15:10:45.079 INFO  (commitScheduler-642-thread-1) [   ]
o.a.s.u.DirectUpdateHandler2 start commit{,optimize=false,openSearc
her=false,waitSearcher=true,expungeDeletes=false,softCommit=false,prepareCommit=false}


This is a hard commit, with openSearcher set to false.  This one was almost assuredly fired by autoCommit.

(I think realtime is for bookeeping?)


The realtime searcher is for the handler usually assigned the "/get" URL path, which only searches on the uniqueKey field, and can search uncommitted documents as well as commited documents. This is an implicit handler, which means that it exists even if it is not configured in solrconfig.xml.  I believe that handler searches uncommitted docs by looking at transaction logs, but I do not know that for sure.  No action or config is necessary for a realtime searcher to be opened - Solr handles all that automatically.  It is likely that when autoCommit fires, a brand new realtime searcher is opened -- because a hard commit will cause changes in the transaction logs, a searcher that searches them must be updated.

Thanks,
Shawn


Reply via email to