[][src]Trait tantivy::collector::CustomScorer

pub trait CustomScorer<TScore>: Sync {
    type Child: CustomSegmentScorer<TScore>;
    fn segment_scorer(
        &self,
        segment_reader: &SegmentReader
    ) -> Result<Self::Child>; }

CustomScorer makes it possible to define any kind of score.

The CustomerScorer 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: CustomSegmentScorer<TScore>

Type of the associated CustomSegmentScorer.

Loading content...

Required methods

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

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

Loading content...

Implementors

impl<F, TScore, T> CustomScorer<TScore> for F where
    F: 'static + Send + Sync + Fn(&SegmentReader) -> T,
    T: CustomSegmentScorer<TScore>, 
[src]

type Child = T

Loading content...