lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: Consolidate MP and LMP
Date Thu, 02 Dec 2010 09:33:35 GMT
Hmm... but MegePolicy is our abstract base class, and LogMergePolicy
adds alot of concrete stuff, ie choosing merges according to "level"
so that you get an exponential staircase of segments in your index.

Conceptually it seems like they are separate?  Like if another merge
policy came along that had the freedom to pick variable-mergeFactor
segments to merge at once... shouldn't it subclass MP?  Or, say we fix
IW to allow out-of-order merges, shouldn't that also subclass MP and
not LMP?

I do agree IW requires LMP in some places, but isn't this limited to
certain methods, eg set/getUseCompoundFile?  Maybe we can move just
these methods up?

Mike

On Thu, Dec 2, 2010 at 4:25 AM, Shai Erera <serera@gmail.com> wrote:
> Hi
>
> While IndexWriter declares it accepts a general MP, it will actually fail if
> the given instance is not LogMP. So I wonder if we shouldn't consolidate
> both of them into one, and pull up all of LMP features to MP. I think all of
> LMP's features are useful for any kind of MP, and if someone wants to ignore
> them he still can.
>
> This is not the sort of change that fits well in trunk. IMO it can fit well
> in 3x too since IW didn't accept anything that is not LMP. So even if it
> will appear we're breaking back-compat, we actually won't. Which is another
> reason, for me, why those two should be consolidated.
>
> What do you think?
>
> Shai
>

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


Mime
View raw message