On Oct 29, 2010, at 5:48 PM, Yonik Seeley wrote: > On Fri, Oct 29, 2010 at 5:36 PM, Grant Ingersoll <gsing...@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