public class LogDocMergePolicy extends LogMergePolicy
LogMergePolicy
that measures size of a
segment as the number of documents (not taking deletions
into account).MergePolicy.MergeAbortedException, MergePolicy.MergeException, MergePolicy.MergeSpecification, MergePolicy.OneMerge
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MIN_MERGE_DOCS
Default minimum segment size.
|
calibrateSizeByDeletes, DEFAULT_MAX_MERGE_DOCS, DEFAULT_MERGE_FACTOR, DEFAULT_NO_CFS_RATIO, LEVEL_LOG_SPAN, maxMergeDocs, maxMergeSize, maxMergeSizeForForcedMerge, mergeFactor, minMergeSize, noCFSRatio, useCompoundFile
writer
Constructor and Description |
---|
LogDocMergePolicy() |
Modifier and Type | Method and Description |
---|---|
int |
getMinMergeDocs()
Get the minimum size for a segment to remain
un-merged.
|
void |
setMinMergeDocs(int minMergeDocs)
Sets the minimum size for the lowest level segments.
|
protected long |
size(SegmentInfo info) |
close, findForcedDeletesMerges, findForcedMerges, findMerges, getCalibrateSizeByDeletes, getMaxMergeDocs, getMergeFactor, getNoCFSRatio, getUseCompoundFile, isMerged, isMerged, message, setCalibrateSizeByDeletes, setMaxMergeDocs, setMergeFactor, setNoCFSRatio, setUseCompoundFile, sizeBytes, sizeDocs, toString, useCompoundFile, verbose
setIndexWriter
public static final int DEFAULT_MIN_MERGE_DOCS
protected long size(SegmentInfo info) throws IOException
size
in class LogMergePolicy
IOException
public void setMinMergeDocs(int minMergeDocs)
public int getMinMergeDocs()
setMinMergeDocs(int)