pub struct FilteredScorer<S: Scorer> { /* private fields */ }Expand description
A scorer that wraps another scorer and skips deleted doc IDs.
Implementations§
Source§impl<S: Scorer> FilteredScorer<S>
impl<S: Scorer> FilteredScorer<S>
pub fn new(inner: S, deleted: RoaringBitmap) -> Self
Trait Implementations§
Source§impl<S: Scorer> Scorer for FilteredScorer<S>
impl<S: Scorer> Scorer for FilteredScorer<S>
Source§fn doc_id(&self) -> DocId
fn doc_id(&self) -> DocId
Current document ID. Valid after
next() or advance() has been
called. Before the first call, the value is unspecified.Source§fn next(&mut self) -> DocId
fn next(&mut self) -> DocId
Advance to the next matching document.
Returns the new doc ID, or
NO_MORE_DOCS if exhausted.Source§fn advance(&mut self, target: DocId) -> DocId
fn advance(&mut self, target: DocId) -> DocId
Advance to the first matching document at or after
target.
Returns the new doc ID, or NO_MORE_DOCS if no match >= target. Read moreSource§fn score(&mut self) -> f32
fn score(&mut self) -> f32
Score of the current document.
Only meaningful when
ScoreMode::needs_scores() is true.Source§fn two_phase(&mut self) -> Option<&mut dyn TwoPhaseIterator>
fn two_phase(&mut self) -> Option<&mut dyn TwoPhaseIterator>
Optional two-phase iteration support. Read more
Source§fn max_score(&self) -> f32
fn max_score(&self) -> f32
Upper bound on the score this scorer can produce for any document.
Used by WAND/MaxScore to skip non-competitive documents.
Default:
f32::MAX (no bound known).Source§fn block_max_score(&mut self, _doc: DocId) -> f32
fn block_max_score(&mut self, _doc: DocId) -> f32
Upper bound on score for documents in the block containing
doc.
Returns max_score() by default (no block-level information).
Overridden by BlockMaxBm25Scorer for tighter per-block bounds. Read moreSource§fn set_min_competitive_score(&mut self, _min_score: f32)
fn set_min_competitive_score(&mut self, _min_score: f32)
Inform this scorer of the minimum competitive score. Documents scoring
below this threshold may be skipped. Default: no-op. Read more
Auto Trait Implementations§
impl<S> Freeze for FilteredScorer<S>where
S: Freeze,
impl<S> RefUnwindSafe for FilteredScorer<S>where
S: RefUnwindSafe,
impl<S> Send for FilteredScorer<S>
impl<S> Sync for FilteredScorer<S>where
S: Sync,
impl<S> Unpin for FilteredScorer<S>where
S: Unpin,
impl<S> UnsafeUnpin for FilteredScorer<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for FilteredScorer<S>where
S: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more