pub struct TermScorer<'a> {
pub iter: HorizontalBP128Iterator<'a>,
pub max_score: f32,
pub idf: f32,
pub term_idx: usize,
pub field_boost: f32,
pub avg_field_len: f32,
}Expand description
Term scorer with MaxScore info and BM25F support
Fields§
§iter: HorizontalBP128Iterator<'a>Iterator over postings
max_score: f32Maximum possible score for this term (computed with BM25F upper bound)
idf: f32IDF component
term_idx: usizeTerm index (for tracking)
field_boost: f32Field boost for BM25F
avg_field_len: f32Average field length for BM25F length normalization
Implementations§
Source§impl<'a> TermScorer<'a>
impl<'a> TermScorer<'a>
Sourcepub fn new(
posting_list: &'a HorizontalBP128PostingList,
idf: f32,
term_idx: usize,
) -> Self
pub fn new( posting_list: &'a HorizontalBP128PostingList, idf: f32, term_idx: usize, ) -> Self
Create a new term scorer with default BM25F parameters
Sourcepub fn with_bm25f(
posting_list: &'a HorizontalBP128PostingList,
idf: f32,
term_idx: usize,
field_boost: f32,
avg_field_len: f32,
) -> Self
pub fn with_bm25f( posting_list: &'a HorizontalBP128PostingList, idf: f32, term_idx: usize, field_boost: f32, avg_field_len: f32, ) -> Self
Create a term scorer with BM25F parameters
Sourcepub fn current_block_max_score(&self) -> f32
pub fn current_block_max_score(&self) -> f32
Get current block’s max score (for block-level pruning)
Sourcepub fn is_exhausted(&self) -> bool
pub fn is_exhausted(&self) -> bool
Is this scorer exhausted?
Auto Trait Implementations§
impl<'a> Freeze for TermScorer<'a>
impl<'a> RefUnwindSafe for TermScorer<'a>
impl<'a> Send for TermScorer<'a>
impl<'a> Sync for TermScorer<'a>
impl<'a> Unpin for TermScorer<'a>
impl<'a> UnwindSafe for TermScorer<'a>
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