lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: When to use addIndexes and when addIndexesNoOptimize
Date Mon, 10 May 2010 18:33:11 GMT
On Mon, May 10, 2010 at 2:18 PM, Shai Erera <serera@gmail.com> wrote:
> Ahh, I see. Didn't think of IndexReader extensions. Why do we call
> optimize() on the local dir in addIndexes then? What's the benefits?

I really don't know!  Maybe to handle the case where local index has
many segments?  Ie, reduce the net number of readers open?

I would think "typically" a smallish number of foreign indexes are
added to a largish number of local segments?

We should at least make it optional to do the optimize...

> We don't do the same on the incoming readers, so why does it matter if e.g. the
> local dir has 2 segments and the incoming ones have 100? We insist on
> optimizing the local 2 segments ...
>
> BTW, addIndexesNoOpt does not obtain a reader, but rather reads the SIs from
> each directory and then calls maybeMerge().

Ahh right, thanks for the clarification.

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message