pub struct BitpackedPostingList {
pub blocks: Vec<BitpackedBlock>,
pub doc_count: u32,
pub max_score: f32,
}Expand description
Bitpacked posting list with block-level skip info
Fields§
§blocks: Vec<BitpackedBlock>Blocks of postings
doc_count: u32Total document count
max_score: f32Maximum score across all blocks (for MaxScore pruning)
Implementations§
Source§impl BitpackedPostingList
impl BitpackedPostingList
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) -> BitpackedPostingIterator<'_>
pub fn iterator(&self) -> BitpackedPostingIterator<'_>
Create an iterator
Trait Implementations§
Source§impl Clone for BitpackedPostingList
impl Clone for BitpackedPostingList
Source§fn clone(&self) -> BitpackedPostingList
fn clone(&self) -> BitpackedPostingList
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 BitpackedPostingList
impl RefUnwindSafe for BitpackedPostingList
impl Send for BitpackedPostingList
impl Sync for BitpackedPostingList
impl Unpin for BitpackedPostingList
impl UnwindSafe for BitpackedPostingList
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