Hmm, this is because as of 3.2.0 the default MergePolicy is now TieredMergePolicy.
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 http://blog.mikemccandless.com On Fri, Oct 21, 2011 at 12:55 PM, Paul Taylor <paul_t...@fastmail.fm> 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: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org