This class implements a {@link MergePolicy} that triesto merge segments into levels of exponentially increasing size, where each level has fewer segments than the value of the merge factor. Whenever extra segments (beyond the merge factor upper bound) are encountered, all segments within the level are merged. You can get or set the merge factor using {@link #getMergeFactor()} and{@link #setMergeFactor(int)} respectively.
This class is abstract and requires a subclass to define the {@link #size} method which specifies how asegment's size is determined. {@link LogDocMergePolicy}is one subclass that measures size by document count in the segment. {@link LogByteSizeMergePolicy} is anothersubclass that measures size as the total byte size of the file(s) for the segment.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|