lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jed Wesley-Smith <>
Subject FSDirectory.close()
Date Tue, 31 Oct 2006 01:33:13 GMT

Just a quick question regarding the need to call Directory.close() 
(actually for an FSDirectory) and whether it is really necessary. As far 
as I can tell, the only implication of this is that the refCount is not 
decremented and therefore the FSDirectory will persist for the life of 
the VM. This is not a problem for us as it never changes for us, and so 
will stick around anyway.

The way we use the directory is to use it for creating IndexReaders and 
IndexWriters that are closed directly after use (apart from the Reader 
used for a Searcher which is closed only when mutative operations are 
made to the index).

At the moment, Directory.close() is NEVER called, not even during 
application shutdown. This doesn't appear to have any problems, but we 
are just wondering if anybody has seen any problems with not calling it.

- jed.

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

View raw message