Trait tantivy::query::Scorer

source ·
pub trait Scorer: Downcast + DocSet + 'static {
    // Required method
    fn score(&mut self) -> Score;
}
Expand description

Scored set of documents matching a query within a specific segment.

See Query.

Required Methods§

source

fn score(&mut self) -> Score

Returns the score.

This method will perform a bit of computation and is not cached.

Implementations§

source§

impl dyn Scorer

source

pub fn is<__T: Scorer>(&self) -> bool

Returns true if the trait object wraps an object of type __T.

source

pub fn downcast<__T: Scorer>(self: Box<Self>) -> Result<Box<__T>, Box<Self>>

Returns a boxed object from a boxed trait object if the underlying object is of type __T. Returns the original boxed trait if it isn’t.

source

pub fn downcast_rc<__T: Scorer>(self: Rc<Self>) -> Result<Rc<__T>, Rc<Self>>

Returns an Rc-ed object from an Rc-ed trait object if the underlying object is of type __T. Returns the original Rc-ed trait if it isn’t.

source

pub fn downcast_ref<__T: Scorer>(&self) -> Option<&__T>

Returns a reference to the object within the trait object if it is of type __T, or None if it isn’t.

source

pub fn downcast_mut<__T: Scorer>(&mut self) -> Option<&mut __T>

Returns a mutable reference to the object within the trait object if it is of type __T, or None if it isn’t.

Trait Implementations§

source§

impl Scorer for Box<dyn Scorer>

source§

fn score(&mut self) -> Score

Returns the score. Read more

Implementations on Foreign Types§

source§

impl Scorer for Box<dyn Scorer>

source§

fn score(&mut self) -> Score

Implementors§

source§

impl Scorer for AllScorer

source§

impl Scorer for EmptyScorer

source§

impl<TDocSet: DocSet + 'static> Scorer for ConstScorer<TDocSet>

source§

impl<TReqScorer, TOptScorer, TScoreCombiner> Scorer for RequiredOptionalScorer<TReqScorer, TOptScorer, TScoreCombiner>
where TReqScorer: Scorer, TOptScorer: Scorer, TScoreCombiner: ScoreCombiner,

source§

impl<TScorer, TDocSetExclude> Scorer for Exclude<TScorer, TDocSetExclude>
where TScorer: Scorer, TDocSetExclude: DocSet + 'static,

source§

impl<TScorer, TOtherScorer> Scorer for Intersection<TScorer, TOtherScorer>
where TScorer: Scorer, TOtherScorer: Scorer,

source§

impl<TScorer, TScoreCombiner> Scorer for Union<TScorer, TScoreCombiner>
where TScoreCombiner: ScoreCombiner, TScorer: Scorer,