Section navigation

Public classSealed TieredMergePolicy

Namespace
Rowles.LeanCorpus.Index.Indexer
Assembly
Rowles.LeanCorpus.dll

Selects balanced merges using physical bytes and reclaimable deletions.

public sealed class TieredMergePolicy : IMergePolicy
Inheritance
TieredMergePolicy
Implements

Public constructor TieredMergePolicy(int)

Initialises a byte-aware tiered policy.

Public property DeletesPctAllowed

Deletion percentage that makes a segment eligible for reclamation.

Public property FloorSegmentMB

Segments smaller than this value are treated as this size for tier budgeting.

Public property MaxMergeAtOnce

Maximum number of source segments in one merge.

Public property MaxMergedSegmentMB

Maximum normal merged-segment size.

Public property SegmentsPerTier

Target number of segments allowed per logarithmic size tier.

Public method 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.