On Mon, May 10, 2010 at 2:18 PM, Shai Erera <ser...@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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to