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 <zhoucheng2...@gmail.com> wrote: > Hi, > > I am using NRTManager and NRTManagerReopenThread. Though I don't close > either writer or the reopen thread, I receive AlreadyClosedException as > follow. > > My initiating NRTManager and NRTManagerReopenThread are: > > FSDirectory indexDir = new NIOFSDirectory(new File( > indexFolder)); > > IndexWriterConfig iwConfig = new IndexWriterConfig( > version, new LimitTokenCountAnalyzer( > StandardAnalyzer, maxTokenNum)); > > iw = new IndexWriter(indexDir, iwConfig); > > nrtm = new NRTManager(iw, null); > > ropt = new NRTManagerReopenThread(nrtm, > targetMaxStaleSec, > targetMinStaleSec); > > ropt.setName("Reopen Thread"); > ropt.setPriority(Math.min(Thread.currentThread().getPriority() + 2, > Thread.MAX_PRIORITY)); > ropt.setDaemon(true); > ropt.start(); > > > Where may the searchermanager fall out? > > > > org.apache.lucene.store.AlreadyClosedException: this SearcherManager is > closed77 > at > org.apache.lucene.search.SearcherManager.acquire(SearcherManager.java:235) > at com.yyt.core.er.lucene.YYTLuceneImpl.codeIndexed(YYTLuceneImpl.java:138) > at com.yyt.core.er.main.copy.SingleCodeER.run(SingleCodeER.java:50) > at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org