| java.lang.Object org.apache.lucene.index.MergePolicy org.apache.lucene.index.LogMergePolicy org.apache.lucene.index.LogByteSizeMergePolicy
LogByteSizeMergePolicy | public class LogByteSizeMergePolicy extends LogMergePolicy (Code) | | This is a
LogMergePolicy that measures size of a
segment as the total byte size of the segment's files.
|
Method Summary | |
public double | getMaxMergeMB() Returns the largest segment (meaured by total byte
size of the segment's files, in MB) that may be merged
with other segments. | public double | getMinMergeMB() Get the minimum size for a segment to remain
un-merged. | 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. | public void | setMinMergeMB(double mb) Sets the minimum size for the lowest level segments.
Any segments below this size are considered to be on
the same level (even if they vary drastically in size)
and will be merged whenever there are mergeFactor of
them. | protected long | size(SegmentInfo info) |
DEFAULT_MAX_MERGE_MB | final public static double DEFAULT_MAX_MERGE_MB(Code) | | Default maximum segment size. A segment of this size
or larger will never be merged. @see setMaxMergeMB
|
DEFAULT_MIN_MERGE_MB | final public static double DEFAULT_MIN_MERGE_MB(Code) | | Default minimum segment size. @see setMinMergeMB
|
LogByteSizeMergePolicy | public LogByteSizeMergePolicy()(Code) | | |
getMaxMergeMB | public double getMaxMergeMB()(Code) | | Returns the largest segment (meaured by total byte
size of the segment's files, in MB) that may be merged
with other segments.
See Also: LogByteSizeMergePolicy.setMaxMergeMB See Also: |
setMaxMergeMB | public void setMaxMergeMB(double mb)(Code) | | 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
LogByteSizeMergePolicy.setMaxMergeDocs is also
used to check whether a segment is too large for
merging (it's either or).
|
setMinMergeMB | public void setMinMergeMB(double mb)(Code) | | Sets the minimum size for the lowest level segments.
Any segments below this size are considered to be on
the same level (even if they vary drastically in size)
and will be merged whenever there are mergeFactor of
them. This effectively truncates the "long tail" of
small segments that would otherwise be created into a
single level. If you set this too large, it could
greatly increase the merging cost during indexing (if
you flush many small segments).
|
|
|