I got this working. I had to close all index searchers and writer on the index, set them to null and call System.gc() before the delete process. I think windows still thinks writer and searchers are pointing to the index directory even if you close them.
Ravi -----Original Message----- From: Otis Gospodnetic [mailto:[EMAIL PROTECTED] Sent: Monday, December 06, 2004 4:48 PM To: Lucene Users List Subject: Re: Index delete failing This smells like a Windows issue. It is possible that something in your JVM is still holding onto the index directory (for example, FSDirectory), and Winblows is not letting you remove the directory. I bet this will work if you exit the JVM and run java.io.file.delete() without calling Lucene. Sorry, my Windows + Lucene experience is limited. Otis --- Ravi <[EMAIL PROTECTED]> wrote: > Hi > We need to delete a lucene index from our application using > java.io.file.delete(). We are closing the indexWriter and even all the > index searchers on that folder. But a call to delete returns false. > There is no lock on the index directory. Interesting thing is that the > deletable and segments files are getting removed. But the rest of the > .cfs are not. Has somebody had similar problem? > > Thanks in advance, > Ravi. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]