Mailing List Archive

Deleting after merge.
Hi,

I have just started to try out Lucenes capabilities, and I really like
it so far. But, I found something that didn't work the way I hoped it
would.

When I merge indexes, using IndexWriter.addIndexes(Directory[]), the
original indexes are removed (or marked for deletion). I wish this
behaviour could be controlled somehow, for example by adding a boolean
parameter that controls wheather the indexes should be kept.

The point of keeping the old indexes is that you can choose to search
in just a part of the site (or the whole site) just by selecting which
index to search in.

Also, reindexing of the site would be much more efficient if you could
reindex just the parts that has changed since the last indexing pass,
and then merge the modified indexes to the "main" index where you
search the whole site.

Are there any special reason why the old indexes _has_ to be deleted,
that I have missed?

/Stefan Bergstrand - Polopoly AB

--
To unsubscribe, e-mail: <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>
RE: Deleting after merge. [ In reply to ]
> From: Stefan Bergstrand [mailto:stefan.bergstrand@polopoly.com]
>
> When I merge indexes, using IndexWriter.addIndexes(Directory[]), the
> original indexes are removed (or marked for deletion). I wish this
> behaviour could be controlled somehow, for example by adding a boolean
> parameter that controls wheather the indexes should be kept.

I think that is a bug. I think it should never delete these.

I've attached a patched version of IndexWriter.java. Can you please try
this and tell me if it fixes the problem?

Thanks,

Doug