You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Jed Wesley-Smith <je...@atlassian.com> on 2006/10/31 02:33:13 UTC

FSDirectory.close()

All,

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.

-- 
cheers,
- jed.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org