Re: NRTManager and AlreadyClosedException

2012-02-08 Thread Simon Willnauer
are you closing the NRTManager while other threads still accessing the SearcherManager? simon On Wed, Feb 8, 2012 at 1:48 PM, Cheng wrote: > I use it exactly the same way. So there must be other reason causing the > problem. > > On Wed, Feb 8, 2012 at 8:21 PM, Ian Lea wrote: > >> Releasing a se

Re: NRTManager and AlreadyClosedException

2012-02-08 Thread Cheng
I use it exactly the same way. So there must be other reason causing the problem. On Wed, Feb 8, 2012 at 8:21 PM, Ian Lea wrote: > Releasing a searcher is not the same as closing the searcher manager, > if that is what you mean. > > The searcher should indeed be released, but once only for each

Re: NRTManager and AlreadyClosedException

2012-02-08 Thread Ian Lea
Releasing a searcher is not the same as closing the searcher manager, if that is what you mean. The searcher should indeed be released, but once only for each acquire(). Your searching threads should have code like that shown in the SearcherManager javadocs. IndexSearcher s = manager.acquire();

Re: NRTManager and AlreadyClosedException

2012-02-08 Thread Cheng
You are right. There is a method by which I do searching. At the end of the method, I release the index searcher (not the searchermanager). Since this method is called by multiple threads. So I think the index searcher will be released multiple times. First, I wonder if releasing searcher is same

Re: NRTManager and AlreadyClosedException

2012-02-08 Thread Ian Lea
Are you closing the SearcherManager? Calling release() multiple times? >From the exception message the first sounds most likely. -- Ian. On Wed, Feb 8, 2012 at 5:20 AM, Cheng wrote: > Hi, > > I am using NRTManager and NRTManagerReopenThread. Though I don't close > either writer or the reopen