Thanks for the clarifications, Yonik. The other thing I notice is
openSearcher() only creates a SolrIndexSearcher without cache (useCache =
false). Therefore, when I try to use generic cache defined in
solrconfig.xml, SolrIndexSearcher.getCache() method returns null. Would it
be OK to turn on searcher cache? 


Yonik Seeley wrote:
> 
> On 9/24/07, climbingrose <[EMAIL PROTECTED]> wrote:
>> I notice that in DUH2, everytime a new document is added, the searcher is
>> closed.
> 
> Keep in mind that for the version you are looking at, the open
> searcher is used *only* for deleting docs... hence if it is open, then
> there are pending deletes to be flushed and it must be closed before
> the IndexWriter is opened.
> 
> This is done lazily so that back-to-back delete-by-query commands
> don't have to keep opening and closing the searcher.  For back-to-back
> adds, the searcher will remain closed and the writer will remain open,
> so nothing is being open+closed per add.
> 
> 
> -Yonik
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Implication-of-not-calling-closeSearcher%28%29-in-DirectUpdateHandler2--tf4508411.html#a12861178
Sent from the Solr - Dev mailing list archive at Nabble.com.

Reply via email to