
LogByteSizeMergePolicy
- Namespace
- Rowles.LeanCorpus.Index.Indexer
- Assembly
- Rowles.LeanCorpus.dll
Merge policy that groups segments by log2 byte-size buckets. When a bucket reaches the threshold, the smallest segments in that bucket are returned as merge candidates. This avoids the tiered policy's worst case where many tiny segments merge into one giant while more tiny ones accumulate.
public sealed class LogByteSizeMergePolicy : IMergePolicy
- Inheritance
-
LogByteSizeMergePolicy
- Implements
LogByteSizeMergePolicy(int, double)
Initialises a log-byte-size merge policy.
FindMerges(IReadOnlyList<SegmentInfo>, IReadOnlySet<string>)
Returns the segments that should be merged from the given list. Returns an empty list if no merge is needed. The caller is responsible for executing the merge and replacing the returned segments with the merged result.