pub struct SparseSkipEntry {
pub first_doc: DocId,
pub last_doc: DocId,
pub offset: u32,
pub max_weight: f32,
}Expand description
Skip entry for sparse posting lists with block-max support
Extends the basic skip entry with max_weight for Block-Max WAND optimization.
Fields§
§first_doc: DocIdFirst doc_id in the block (absolute)
last_doc: DocIdLast doc_id in the block
offset: u32Byte offset to block data
max_weight: f32Maximum weight in this block (for Block-Max optimization)
Implementations§
Source§impl SparseSkipEntry
impl SparseSkipEntry
pub fn new( first_doc: DocId, last_doc: DocId, offset: u32, max_weight: f32, ) -> Self
Sourcepub fn block_max_contribution(&self, query_weight: f32) -> f32
pub fn block_max_contribution(&self, query_weight: f32) -> f32
Compute the maximum possible contribution of this block to a dot product
For a query dimension with weight query_weight, the maximum contribution
from this block is query_weight * max_weight.
Trait Implementations§
Source§impl Clone for SparseSkipEntry
impl Clone for SparseSkipEntry
Source§fn clone(&self) -> SparseSkipEntry
fn clone(&self) -> SparseSkipEntry
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 moreSource§impl Debug for SparseSkipEntry
impl Debug for SparseSkipEntry
Source§impl PartialEq for SparseSkipEntry
impl PartialEq for SparseSkipEntry
impl Copy for SparseSkipEntry
impl StructuralPartialEq for SparseSkipEntry
Auto Trait Implementations§
impl Freeze for SparseSkipEntry
impl RefUnwindSafe for SparseSkipEntry
impl Send for SparseSkipEntry
impl Sync for SparseSkipEntry
impl Unpin for SparseSkipEntry
impl UnwindSafe for SparseSkipEntry
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.