lucene-java-user mailing list archives

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

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.

Regards,
Mindaugas

On Fri, May 13, 2011 at 2:08 PM, Alexey Lef <alexey@sciquest.com> 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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message