lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shai Erera <ser...@gmail.com>
Subject Re: When to use addIndexes and when addIndexesNoOptimize
Date Mon, 10 May 2010 18:18:49 GMT
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? 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().

Shai

On Mon, May 10, 2010 at 7:27 PM, Michael McCandless <
lucene@mikemccandless.com> wrote:

> addIndexes accepts IndexReaders, so eg "foreign" IndexReader impls can
> be passed in (eg FilterIndexReader).
>
> While addIndexesNoOptimize accepts Directory, ie it gets a reader using
> IR.open.
>
> Mike
>
> On Mon, May 10, 2010 at 5:58 AM, Shai Erera <serera@gmail.com> wrote:
> > Hi
> >
> > As I was working on LUCENE-1585 and understanding more the differences
> > between addIndexes and addIndexesNoOptimize, I was wondering why do we
> have
> > those two methods? It seems like addIndexes's usage is discouraged, no?
> Can
> > someone please explain me why it isn't deprecated, and addIndexesNoOpt
> > becomes the default one? Are we losing any functionality?
> >
> > Shai
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>

Mime
View raw message