lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ganesh" <>
Subject Re: Closing Index Reader
Date Wed, 15 Oct 2008 08:57:21 GMT
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.


----- Original Message ----- 
From: "Khawaja Shams" <>
To: <>
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 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message