This happens, on Windows, when there is an IndexReader still reading
those files.  IndexWriter will periodically (after a merge completes
or a new segment is flushed) retry deleting those files, but it won't
succeed until no reader has a given file open anymore.

IW also deletes unreferenced files when it's first opened.  So if you
want to force it to try to delete, close your current IW and open a
new one (with create=false).

Mike

On Wed, Feb 10, 2010 at 4:24 AM,  <luocan19826...@sohu.com> wrote:
>
>
>
>
> lucene did not delete old index file after optimize method called.
> ps:I call IndexWriter.getReader() and then call old IndexReader.close() every 
> 1 minute,
> a long time pass, I watche old index file did not disappear.
> after I restart my program, optimize index file disappear,but old index file 
> stay!!

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

Reply via email to