lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Miller <markrmil...@gmail.com>
Subject Re: Lucene 2.9.0-rc5 : Reader stays open after IndexWriter.updateDocument(), is that possible?
Date Sun, 27 Sep 2009 14:49:37 GMT
I guess the fact that Lucene closes it is a legacy we may be stuck with
- but I think it encourages bad practice code. There is plenty of room
for an exception to be thrown before the Reader is sure to be closed in
a finally block.

Part of why its standard convention to close your own I think, rather
then somewhere in the method you pass it into. Best practice is close it
in a finally block yourself, with the try starting right after you make it.


Not a big deal though. If it was, we'd know about it by now ;)

Chris Hostetter wrote:
> : So in 2.9, the Reader is correctly closed, if the TokenStream chain is
> : correctly set up, passing all close() calls to the delegate.
>
> Thanks for digging into that Uwe.
>
> So Daniel: The ball is in your court here: what analyzer / 
> tokenizer+tokenfilters is your app using in the cases where you see 
> Readers not getting closed by Lucene -- if they involve your own custom 
> Tokenizers then that may be where the problem is, but if all the Analysis 
> pieces you are using come out of hte box with Lucene please let us know so 
> we can check them.
>
>
> -Hoss
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>
>   


-- 
- Mark

http://www.lucidimagination.com




---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message