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

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

The MergePolicy 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

Important traits for Vec<u8>

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.

Important traits for Box<R>

Returns a boxed clone of the MergePolicy.

Implementors