lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Muir <rcm...@gmail.com>
Subject Re: Closing directory in LuceneTestCase causes stacktrace
Date Fri, 29 Jun 2012 00:57:22 GMT
On Thu, Jun 28, 2012 at 8:22 PM, Brendan Grainger
<brendan.grainger@gmail.com> wrote:
>
> Interestingly, if I change the *** line above to use the deprecated constructor taking
just the directory it works fine:
>

its not interesting at all, its the typical contract of a java method.
he who opens it closes it.

I'll quote myself again:

in this case (where IndexSearcher takes a reader that you passed in),
closing the searcher won't actually close the underlying reader.
you passed it in, so you should be sure to close this reader yourself.


-- 
lucidimagination.com

---------------------------------------------------------------------
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