Apache Lucene.Net 2.4.0 Class Library API

IndexWriter.SetMaxMergeDocs Method 

Determines the largest segment (measured by document count) that may be merged with other segments. Small values (e.g., less than 10,000) are best for interactive indexing, as this limits the length of pauses while indexing to a few seconds. Larger values are best for batched indexing and speedier searches.

The default value is {@link Integer#MAX_VALUE}.

Note that this method is a convenience method: it just calls mergePolicy.SetMaxMergeDocs as long as mergePolicy is an instance of {@link LogMergePolicy}. Otherwise an System.ArgumentException is thrown.

The default merge policy ({@link LogByteSizeMergePolicy}) also allows you to set this limit by net size (in MB) of the segment, using {@link LogByteSizeMergePolicy#setMaxMergeMB}.

public virtual void SetMaxMergeDocs(
   int maxMergeDocs
);

See Also

IndexWriter Class | Lucene.Net.Index Namespace