lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timo Nentwig <luc...@nitwit.de>
Subject IndexSearcher.close() doesn't close Directory
Date Sun, 20 Apr 2008 09:36:19 GMT
Hi!

I advised Directory.close() (AspectJ) and noticed that it's not called at all 
for the following code:

final FSDirectory d = FSDirectory.getDirectory( path );
final IndexReader r = IndexReader.open( d );
final IndexSearcher s = new IndexSearcher( r );
...
s.close();
r.close();
d.close(); // Directory isn't closed by IndexSearcher nor by IndexReader

I think that should be mentioned in javadoc.

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