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
fn compute_merge_candidates(&self,
segments: &[SegmentMeta])
-> Vec<MergeCandidate>
segments: &[SegmentMeta])
-> Vec<MergeCandidate>
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.
fn box_clone(&self) -> Box<MergePolicy>
Returns a boxed clone of the MergePolicy.
Implementors
impl MergePolicy for NoMergePolicy
impl MergePolicy for LogMergePolicy