java.lang.Object | |||
↳ | org.apache.lucene.index.MergePolicy | ||
↳ | org.apache.lucene.index.LogMergePolicy | ||
↳ | org.apache.lucene.index.LogByteSizeMergePolicy |
Known Direct Subclasses |
This is a LogMergePolicy
that measures size of a
segment as the total byte size of the segment's files.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
double | DEFAULT_MAX_MERGE_MB | Default maximum segment size. | |||||||||
double | DEFAULT_MAX_MERGE_MB_FOR_OPTIMIZE | Default maximum segment size. | |||||||||
double | DEFAULT_MIN_MERGE_MB | Default minimum segment size. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.apache.lucene.index.LogMergePolicy
|
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.apache.lucene.index.LogMergePolicy
| |||||||||||
From class
org.apache.lucene.index.MergePolicy
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the largest segment (measured by total byte
size of the segment's files, in MB) that may be merged
with other segments.
| |||||||||||
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.
| |||||||||||
Get the minimum size for a segment to remain
un-merged.
| |||||||||||
Determines the largest segment (measured by total byte size of the segment's files, in MB) that may be merged with other segments. | |||||||||||
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. | |||||||||||
Sets the minimum size for the lowest level segments.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.apache.lucene.index.LogMergePolicy
| |||||||||||
From class
org.apache.lucene.index.MergePolicy
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
java.io.Closeable
|
Default maximum segment size. A segment of this size or larger will never be merged. @see setMaxMergeMB
Default maximum segment size. A segment of this size or larger will never be merged during optimize. @see setMaxMergeMBForOptimize
Default minimum segment size. @see setMinMergeMB
Returns the largest segment (measured by total byte size of the segment's files, in MB) that may be merged with other segments.
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.
Get the minimum size for a segment to remain un-merged.
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 setMaxMergeDocs(int)
is also
used to check whether a segment is too large for
merging (it's either or).
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 optimize()
is called.
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).