lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Devon H. O'Dell" <devon.od...@gmail.com>
Subject Re: org.apache.lucene.store.AlreadyClosedException: this IndexReader is closed
Date Fri, 01 Apr 2011 19:24:22 GMT
2011/4/1 Yogesh Dabhi <ydabhi@asite.com>:
> Hi
>
> Concurrently 5 user access same lucene directory for searching document
>
> That time I got bellow exception
>
> org.apache.lucene.store.AlreadyClosedException: this IndexReader is
> closed
>
> is there a way to handle such error

Use a ReentrantReaderWriterLock around the process of re-opening your
IndexReader and re-creating your IndexSearcher (or closing your
reader, if that's all you're doing), and the process of using your
IndexSearcher for searching.

--dho

> Thanks & Regards
>
> Yogesh
>
>

---------------------------------------------------------------------
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