[][src]Trait tantivy::query::Weight

pub trait Weight: Send + Sync + 'static {
    fn scorer(&self, reader: &SegmentReader) -> Result<Box<dyn Scorer>>;
fn explain(&self, reader: &SegmentReader, doc: DocId) -> Result<Explanation>; fn count(&self, reader: &SegmentReader) -> Result<u32> { ... } }

A Weight is the specialization of a Query for a given set of segments.

See Query.

Required methods

fn scorer(&self, reader: &SegmentReader) -> Result<Box<dyn Scorer>>

Returns the scorer for the given segment. See Query.

fn explain(&self, reader: &SegmentReader, doc: DocId) -> Result<Explanation>

Returns an Explanation for the given document.

Loading content...

Provided methods

fn count(&self, reader: &SegmentReader) -> Result<u32>

Returns the number documents within the given SegmentReader.

Loading content...


impl Weight for AllWeight[src]

impl Weight for EmptyWeight[src]

impl<A> Weight for AutomatonWeight<A> where
    A: Automaton + Send + Sync + 'static, 

Loading content...