|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.index.MergePolicy org.apache.lucene.index.LogMergePolicy org.apache.lucene.index.LogByteSizeMergePolicy
public class LogByteSizeMergePolicy
This is a LogMergePolicy
that measures size of a
segment as the total byte size of the segment's files.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.lucene.index.MergePolicy |
---|
MergePolicy.MergeAbortedException, MergePolicy.MergeException, MergePolicy.MergeSpecification, MergePolicy.OneMerge |
Field Summary | |
---|---|
static double |
DEFAULT_MAX_MERGE_MB
Default maximum segment size. |
static double |
DEFAULT_MAX_MERGE_MB_FOR_OPTIMIZE
Default maximum segment size. |
static double |
DEFAULT_MIN_MERGE_MB
Default minimum segment size. |
Fields inherited from class org.apache.lucene.index.LogMergePolicy |
---|
calibrateSizeByDeletes, DEFAULT_MAX_MERGE_DOCS, DEFAULT_MERGE_FACTOR, DEFAULT_NO_CFS_RATIO, LEVEL_LOG_SPAN, maxMergeDocs, maxMergeSize, maxMergeSizeForOptimize, mergeFactor, minMergeSize, noCFSRatio, useCompoundFile |
Fields inherited from class org.apache.lucene.index.MergePolicy |
---|
writer |
Constructor Summary | |
---|---|
LogByteSizeMergePolicy()
|
Method Summary | |
---|---|
double |
getMaxMergeMB()
Returns the largest segment (measured by total byte size of the segment's files, in MB) that may be merged with other segments. |
double |
getMaxMergeMBForOptimize()
Returns the largest segment (measured by total byte size of the segment's files, in MB) that may be merged with other segments during optimize. |
double |
getMinMergeMB()
Get the minimum size for a segment to remain un-merged. |
void |
setMaxMergeMB(double mb)
Determines the largest segment (measured by total byte size of the segment's files, in MB) that may be merged with other segments. |
void |
setMaxMergeMBForOptimize(double mb)
Determines the largest segment (measured by total byte size of the segment's files, in MB) that may be merged with other segments during optimize. |
void |
setMinMergeMB(double mb)
Sets the minimum size for the lowest level segments. |
protected long |
size(SegmentInfo info)
|
Methods inherited from class org.apache.lucene.index.LogMergePolicy |
---|
close, findMerges, findMergesForOptimize, findMergesToExpungeDeletes, getCalibrateSizeByDeletes, getMaxMergeDocs, getMergeFactor, getNoCFSRatio, getUseCompoundFile, isOptimized, isOptimized, message, setCalibrateSizeByDeletes, setMaxMergeDocs, setMergeFactor, setNoCFSRatio, setUseCompoundFile, sizeBytes, sizeDocs, toString, useCompoundFile, verbose |
Methods inherited from class org.apache.lucene.index.MergePolicy |
---|
setIndexWriter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final double DEFAULT_MIN_MERGE_MB
public static final double DEFAULT_MAX_MERGE_MB
public static final double DEFAULT_MAX_MERGE_MB_FOR_OPTIMIZE
Constructor Detail |
---|
public LogByteSizeMergePolicy()
Method Detail |
---|
protected long size(SegmentInfo info) throws IOException
size
in class LogMergePolicy
IOException
public void setMaxMergeMB(double mb)
Determines the largest segment (measured by total byte size of the segment's files, in MB) that may be merged with other segments. Small values (e.g., less than 50 MB) 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.
Note that LogMergePolicy.setMaxMergeDocs(int)
is also
used to check whether a segment is too large for
merging (it's either or).
public double getMaxMergeMB()
setMaxMergeMB(double)
public void setMaxMergeMBForOptimize(double mb)
Determines the largest segment (measured by total
byte size of the segment's files, in MB) that may be
merged with other segments during optimize. Setting
it low will leave the index with more than 1 segment,
even if IndexWriter.optimize()
is called.
public double getMaxMergeMBForOptimize()
setMaxMergeMBForOptimize(double)
public void setMinMergeMB(double mb)
public double getMinMergeMB()
setMinMergeMB(double)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |