lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Lea <ian....@gmail.com>
Subject Re: NRTManager and AlreadyClosedException
Date Wed, 08 Feb 2012 11:51:00 GMT
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 <zhoucheng2008@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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message