lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: No longer able to set merge factor since updating to Lucene 3.4
Date Sat, 22 Oct 2011 14:19:01 GMT
Hmm, this is because as of 3.2.0 the default MergePolicy is now

But: if you pass Version.LUCENE_31 when you create the
IndexWriterConfig you should get the old default (LogMergePolicy) and
then IW.setMergeFactor should work.

But it's better to use TieredMergePolicy (it's able to pick better
merges), and instead set the merge settings directly on that class.
That class actually "splits" mergeFactor into two separate controls:
maxMergeAtOnce (how many segments to merge at a time) and
segmentsPerTier (how "aggressively" you need to merge -- bigger
numbers means merging is delayed but your index has more segments).

Mike McCandless

On Fri, Oct 21, 2011 at 12:55 PM, Paul Taylor <> wrote:
> Hi upgraded from 3.1 to 3.4, now it is compliaing about deprecated method
> indexWriter.setMergeFactor();
> Saying it can only be used with the default LogMergePolicy ,but I never set
> the merge policy so shouldn't I be using the default anyway ?
> Paul
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message