Trait tantivy::merge_policy::MergePolicy [] [src]

pub trait MergePolicy: Send + Debug {
    fn compute_merge_candidates(&self,
                            segments: &[SegmentMeta])
                            -> Vec<MergeCandidate>; fn box_clone(&self) -> Box<MergePolicy>; }

The Merge policy defines which segments should be merged.

Every time a the list of segments changes, the segment updater asks the merge policy if some segments should be merged.

Required Methods

Given the list of segment metas, returns the list of merge candidates.

This call happens on the segment updater thread, and will block other segment updates, so all implementations should happen rapidly.

Returns a boxed clone of the MergePolicy.

Implementors