Trait tantivy::query::ScoreCombiner

source ·
pub trait ScoreCombiner: Default + Clone + Send + Copy + 'static {
    // Required methods
    fn update<TScorer: Scorer>(&mut self, scorer: &mut TScorer);
    fn clear(&mut self);
    fn score(&self) -> Score;
}
Expand description

The ScoreCombiner trait defines how to compute an overall score given a list of scores.

Required Methods§

source

fn update<TScorer: Scorer>(&mut self, scorer: &mut TScorer)

Aggregates the score combiner with the given scorer.

The ScoreCombiner may decide to call .scorer.score() or not.

source

fn clear(&mut self)

Clears the score combiner state back to its initial state.

source

fn score(&self) -> Score

Returns the aggregate score.

Object Safety§

This trait is not object safe.

Implementors§