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 Dan Armbrust <da...@gmail.com> on 2006/02/13 18:26:41 UTC

When do files in 'deleteable' get deleted?

If I am using lucene (daily build from ~ a month ago or so) on windows - 
and when I merge two indexes together, I get a number of .cfs files 
noted in my 'deleteable' file - but they never seem to actually be 
deleted by lucene.

When does lucene try to delete these files - does it ever work on 
windows?  As far as I can tell, nothing should be holding a lock on 
those files.  Yet, even when I shut down the only jvm that is using 
these indexes, and then open a new one, and perform a search, they don't 
go away.

Thanks,

Dan

-- 
****************************
Daniel Armbrust
Biomedical Informatics
Mayo Clinic Rochester
daniel.armbrust(at)mayo.edu
http://informatics.mayo.edu/

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


Re: When do files in 'deleteable' get deleted?

Posted by Volodymyr Bychkoviak <vb...@i-hypergrid.com>.
Lucene tries to delete 'deletable' files every time index is modified. 
The reason files can't be deleted is that those files are is use (thay 
are open). (This is applicable mainly to Windows, as far as Linux allows 
to delete files that are in use...)

If your files 'deletable' don't get deleted you should check if your 
IndexReader/IndexSearcher are properly closed.

For Windows I suggest Utility 'ProcesExplorer' from Sysinternals. It can 
show you what files are open by selected process and find out what 
processes keep selected file open.

Dan Armbrust wrote:
> If I am using lucene (daily build from ~ a month ago or so) on windows 
> - and when I merge two indexes together, I get a number of .cfs files 
> noted in my 'deleteable' file - but they never seem to actually be 
> deleted by lucene.
>
> When does lucene try to delete these files - does it ever work on 
> windows?  As far as I can tell, nothing should be holding a lock on 
> those files.  Yet, even when I shut down the only jvm that is using 
> these indexes, and then open a new one, and perform a search, they 
> don't go away.
>
> Thanks,
>
> Dan
>

-- 
regards,
Volodymyr Bychkoviak