[prev in list] [next in list] [prev in thread] [next in thread]
List: solr-user
Subject: Re: SolrCore.getSearcher() and postCommit()
From: Grant Ingersoll <gsingers () apache ! org>
Date: 2010-10-30 11:03:17
Message-ID: F1978CCB-EF8A-4EAA-B219-D82F83605FE4 () apache ! org
[Download RAW message or body]
On Oct 29, 2010, at 5:48 PM, Yonik Seeley wrote:
> On Fri, Oct 29, 2010 at 5:36 PM, Grant Ingersoll <gsingers@apache.org> wrote:
> > Is it OK to call and increment a Searcher ref (i.e. SolrCore.getSearcher()) in a \
> > SolrEventListener.postCommit() hook as long as I decrement it when I am done? I \
> > need to get a handle on an IndexReader so I can dump out a portion of the index \
> > to an external process.
>
> Yes, just be aware that the searcher you will get will not contain the
> recently committed documents.
> If you want that, look at the newSearcher hook instead.
Ah, good point. I do need that. Also, the newSearcher event makes it easier since I \
don't have to worry about refcounting it. Thanks, Yonik!
-Grant
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic