pub struct HorizontalBP128PostingList {
pub blocks: Vec<HorizontalBP128Block>,
pub doc_count: u32,
pub max_score: f32,
}Expand description
Bitpacked posting list with block-level skip info
Fields§
§blocks: Vec<HorizontalBP128Block>Blocks of postings
doc_count: u32Total document count
max_score: f32Maximum score across all blocks (for MaxScore pruning)
Implementations§
Source§impl HorizontalBP128PostingList
impl HorizontalBP128PostingList
Sourcepub fn from_postings(doc_ids: &[u32], term_freqs: &[u32], idf: f32) -> Self
pub fn from_postings(doc_ids: &[u32], term_freqs: &[u32], idf: f32) -> Self
Create from raw doc_ids and term frequencies
Sourcepub fn compute_bm25f_upper_bound(max_tf: u32, idf: f32, field_boost: f32) -> f32
pub fn compute_bm25f_upper_bound(max_tf: u32, idf: f32, field_boost: f32) -> f32
Compute BM25F upper bound score for a given max_tf and IDF Uses conservative length normalization (assumes shortest possible document)
Sourcepub fn deserialize<R: Read>(reader: &mut R) -> Result<Self>
pub fn deserialize<R: Read>(reader: &mut R) -> Result<Self>
Deserialize a posting list
Sourcepub fn iterator(&self) -> HorizontalBP128Iterator<'_>
pub fn iterator(&self) -> HorizontalBP128Iterator<'_>
Create an iterator
Trait Implementations§
Source§impl Clone for HorizontalBP128PostingList
impl Clone for HorizontalBP128PostingList
Source§fn clone(&self) -> HorizontalBP128PostingList
fn clone(&self) -> HorizontalBP128PostingList
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for HorizontalBP128PostingList
impl RefUnwindSafe for HorizontalBP128PostingList
impl Send for HorizontalBP128PostingList
impl Sync for HorizontalBP128PostingList
impl Unpin for HorizontalBP128PostingList
impl UnwindSafe for HorizontalBP128PostingList
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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