lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mindaugas Žakšauskas <>
Subject Re: IndexReader.close() behavior
Date Fri, 13 May 2011 13:27:15 GMT

In my quest to fight a similar problem, I ended up writing a wrapper
finalizer (sic!) that simply closes the underlying reader/searcher. It
might be against all advices (e.g. "Effective Java 2ed" Item 7) but I
simply couldn't find any better solution to this problem.

I wish I wouldn't need doing close() myself. Hopefully this will be
improved with Java 7's AutoCloseable one day.


On Fri, May 13, 2011 at 2:08 PM, Alexey Lef <> wrote:
> Apologies for a long silence - have been fighting a nasty bug of a non-computer variety.
> We are using 3.0.3. I was trying to upgrade to 3.1 and clear all deprecation warnings.
What I described was an attempt to switch from MultiSearcher to MultiReader. We had a simple
delegating IndexSearcher wrapper for cached/reused IndexSearchers that was doing reference
counting. <..>

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

View raw message