Java Mailing List Archive

http://www.java2.5341.com/

Home » java-user.lucene »

Closing Index Reader

Khawaja Shams

2008-10-14

Replies: Find Java Web Hosting

Author LoginPost Reply
Hello, I am using the reopen method in the IndexReader class. In the case
of the IndexReader being updated, I would like to create a new IndexSearcher
and close the old IndexReader. When closing an instance of IndexReader, do I
have to wait for currently executing searches (through an IndexSearcher with
this instance of the IndexReader) to complete? The javadoc states that I
should not invoke any method on the reader after the close is called, but I
am curious about the state of the searches that are using the reader when
the close is called.


I would appreciate any thoughts on the question and on my approach.


Thanks!
©2008 java2.5341.com - Jax Systems, LLC, U.S.A.