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 <ser...@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-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org