lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Monsur Hossain" <>
Subject RE: IndexSearcher hanging on to old index files in Windows
Date Fri, 29 Apr 2005 19:29:44 GMT
> I ran this test a little differently than letting the 
> IndexSearcher get garbage collected. Instead, I explicitly closed the 
> searcher (reader) and reopened it periodically. 

Thanks Chuck, this is all really helpful.  That explicit close() is what
allows the files stored up in "deletable" to eventually be deleted.  I'm
wary of relying on the GC to clean up my work, so I think I'll use that
reference counting system you mentioned.  That way I can be guaranteed that
at some point, my IndexSearcher is in fact closed.  (In my tests, when I
left it up to the GC, these open file handles stuck around for hours).


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

View raw message