lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: problem:lucene did not delete old index file after optimize method called
Date Wed, 10 Feb 2010 09:58:12 GMT
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).


On Wed, Feb 10, 2010 at 4:24 AM,  <> 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:
For additional commands, e-mail:

View raw message