This usually happens on J2EE environment, if you use RAMDirectory. Before Lucene-1195.(svn r659602, May23,2008), if you close() RAMDirectory, the resources will be released right away.
After Lucene-1195.(svn r659602, May23,2008),If you simply close() the RAMDirectory, there will be an undetermined(and uncontrollable) time before the RAMDirectory resources are released. So if you want to avoid it, you will need to use re-open() function instead of close() and open(), according to lucene developers. I haven't tried the re-open approach, but instead I downgrade to the svn version before the patch. In the previous version, close() means close(), not a delayed close(). Before Lucene developers are willing to fix this, I will have to manually remove Lucene-1195 myself if an upgrade is needed. If you also want this to be fixed, you can join the ongoing discussion to support it on java-dev @lucene.apache.org mailing list. -- Chris Lu ------------------------- Instant Scalable Full-Text Search On Any Database/Application site: http://www.dbsight.net demo: http://search.dbsight.com Lucene Database Search in 3 minutes: http://wiki.dbsight.com/index.php?title=Create_Lucene_Database_Search_in_3_minutes DBSight customer, a shopping comparison site, (anonymous per request) got 2.6 Million Euro funding!