[][src]Trait tantivy::collector::ScoreTweaker

pub trait ScoreTweaker<TScore>: Sync {
    type Child: ScoreSegmentTweaker<TScore>;
    fn segment_tweaker(
        &self,
        segment_reader: &SegmentReader
    ) -> Result<Self::Child>; }

ScoreTweaker makes it possible to tweak the score emitted by the scorer into another one.

The ScoreTweaker itself does not make much of the computation itself. Instead, it helps constructing Self::Child instances that will compute the score at a segment scale.

Associated Types

type Child: ScoreSegmentTweaker<TScore>

Type of the associated ScoreSegmentTweaker.

Loading content...

Required methods

fn segment_tweaker(&self, segment_reader: &SegmentReader) -> Result<Self::Child>

Builds a child tweaker for a specific segment. The child scorer is associated to a specific segment.

Loading content...

Implementors

impl<F, TScore, TSegmentScoreTweaker> ScoreTweaker<TScore> for F where
    F: 'static + Send + Sync + Fn(&SegmentReader) -> TSegmentScoreTweaker,
    TSegmentScoreTweaker: ScoreSegmentTweaker<TScore>, 
[src]

type Child = TSegmentScoreTweaker

Loading content...