[ https://issues.apache.org/jira/browse/LUCENE-3445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13112195#comment-13112195 ]
Michael McCandless commented on LUCENE-3445: -------------------------------------------- Maybe we just shouldn't ever call warm from the ctor? Caller can easily call warm themselves... we can just jdoc this. bq. Also, I remember there was a ctor which took IndexWriter, to allow for an NRT-SearcherManager. What happened to it? Right, I removed it because we have NRTManager now. bq. Mike, would it be possible to merge the NRT and SearcherManager into one class / manager or that maybe both implement the same interface? Right, they used to be merged.... we could consider merging them again? NRTManager is more feature-full, though, because it offers add/updateDocument(s) APIs that invoke the writer but return a [long] gen, which you can then turnaround and pass to .get() to ensure the returned searcher includes those changes. SearcherManager doesn't have notion... unless we somehow tie in the IndexReader.getVersion() somehow? I'm torn... they seem different enough that maybe they should remain separate. Plus, users usually know quite strongly if they use NRT or not and could pick the right manager accordingly... > Add SearcherManager, to manage IndexSearcher usage across threads and reopens > ----------------------------------------------------------------------------- > > Key: LUCENE-3445 > URL: https://issues.apache.org/jira/browse/LUCENE-3445 > Project: Lucene - Java > Issue Type: Improvement > Reporter: Michael McCandless > Assignee: Michael McCandless > Fix For: 3.5, 4.0 > > Attachments: LUCENE-3445.patch > > > This is a simple helper class I wrote for Lucene in Action 2nd ed. > I'd like to commit under Lucene (contrib/misc). > It simplifies using & reopening an IndexSearcher across multiple > threads, by using IndexReader's ref counts to know when it's safe > to close the reader. > In the process I also factored out a test base class for tests that > want to make lots of simultaneous indexing and searching threads, and > fixed TestNRTThreads (core), TestNRTManager (contrib/misc) and the new > TestSearcherManager (contrib/misc) to use this base class. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org