Struct tantivy::query::RequiredOptionalScorer[][src]

pub struct RequiredOptionalScorer<TReqScorer, TOptScorer, TScoreCombiner> { /* fields omitted */ }

Given a required scorer and an optional scorer matches all document from the required scorer and complements the score using the optional scorer.

This is useful for queries like +somethingrequired somethingoptional.

Note that somethingoptional has no impact on the DocSet.

Methods

impl<TReqScorer, TOptScorer, TScoreCombiner> RequiredOptionalScorer<TReqScorer, TOptScorer, TScoreCombiner> where
    TOptScorer: DocSet
[src]

Creates a new RequiredOptionalScorer.

Trait Implementations

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

Goes to the next element. .advance(...) needs to be called a first time to point to the correct element. Read more

Returns the current document

Returns a best-effort hint of the length of the docset. Read more

After skipping, position the iterator in such a way that .doc() will return a value greater than or equal to target. Read more

Fills a given mutable buffer with the next doc ids from the DocSet Read more

Appends all docs to a bitset.

Returns the number documents matching. Read more

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

Returns the score. Read more

Consumes the complete DocSet and push the scored documents to the collector. Read more

Auto Trait Implementations

impl<TReqScorer, TOptScorer, TScoreCombiner> Send for RequiredOptionalScorer<TReqScorer, TOptScorer, TScoreCombiner> where
    TOptScorer: Send,
    TReqScorer: Send,
    TScoreCombiner: Send

impl<TReqScorer, TOptScorer, TScoreCombiner> Sync for RequiredOptionalScorer<TReqScorer, TOptScorer, TScoreCombiner> where
    TOptScorer: Sync,
    TReqScorer: Sync,
    TScoreCombiner: Sync