"Cool Coder" <[EMAIL PROTECTED]> wrote: > I tried with your suggestion but still it did not delete old index files.
That's very odd. Are you sure you added that line after your first reader was closed & second one was opened? It's that first reader that prevents deleting of the old index files. > Anyway I closed reader before closing writer and reopened reader after > closing writer which deleted all old index files. > > reader.close(); > writer.close(); > reader.open(); This should work as well, but there is a risk that you have a somewhat longish time during which you have no reader to service queries. EG if writer.close() kicks off a series of merges it could take quite a while. Though if the index is small in your case this may be a non-issue in practice... Mike --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]