Trait tantivy::query::Scorer[][src]

pub trait Scorer: Downcast + DocSet + 'static {
    fn score(&mut self) -> Score;
}

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

See Query.

Required methods

fn score(&mut self) -> Score[src]

Returns the score.

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

Loading content...

Implementations

impl dyn Scorer[src]

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

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

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

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.

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

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.

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

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

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

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

Implementations on Foreign Types

impl Scorer for Box<dyn Scorer>[src]

Loading content...

Implementors

impl Scorer for AllScorer[src]

impl Scorer for EmptyScorer[src]

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

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

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

impl<TScorer, TOtherScorer> Scorer for Intersection<TScorer, TOtherScorer> where
    TScorer: Scorer,
    TOtherScorer: Scorer
[src]

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

Loading content...