Yes. Once the Indexreader is closed, you should not do make any calls with
that object.
Extend the IndexReader to add support for reference count. Close the reader
once the count is zero.
Regards
Ganesh
----- Original Message -----
From: "Khawaja Shams" <[EMAIL PROTECTED]>
To: <java-user@lucene.apache.org>
Sent: Wednesday, October 15, 2008 8:05 AM
Subject: Closing Index Reader
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!
Send instant messages to your online friends http://in.messenger.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]