lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cheng <zhoucheng2...@gmail.com>
Subject NRTManager and AlreadyClosedException
Date Wed, 08 Feb 2012 05:20:07 GMT
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)

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message