Trait tantivy::collector::CustomScorer [−][src]
pub trait CustomScorer<TScore>: Sync {
type Child: CustomSegmentScorer<TScore>;
fn segment_scorer(
&self,
segment_reader: &SegmentReader
) -> Result<Self::Child>;
}
Expand description
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 Child: CustomSegmentScorer<TScore>
Type of the associated CustomSegmentScorer
.
Required methods
fn segment_scorer(&self, segment_reader: &SegmentReader) -> Result<Self::Child>
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.