pub struct BlockPostingIterator<'a> { /* private fields */ }Expand description
Iterator over block posting list with skip support Can be either borrowed or owned via Cow
Document IDs and frequencies have separate bounded decode buffers. Document movement does not initialize frequencies; score and position consumers do. Only the current block is retained, including during scratch recycling.
Implementations§
Source§impl<'a> BlockPostingIterator<'a>
impl<'a> BlockPostingIterator<'a>
Sourcepub fn position_cursor(&self) -> u64
pub fn position_cursor(&self) -> u64
Offset of the current posting’s positions in the term’s position
stream (see structures::postings::positions_v2): the block’s cursor
plus the term frequencies of the postings before it in the block.
Meaningful only for lists built with position cursors.
pub fn doc(&self) -> DocId
pub fn term_freq(&self) -> u32
pub fn advance(&mut self) -> DocId
pub fn seek(&mut self, target: DocId) -> DocId
Sourcepub fn skip_to_next_block(&mut self) -> DocId
pub fn skip_to_next_block(&mut self) -> DocId
Skip to the next block, returning the first doc_id in the new block This is used for block-max pruning when the current block’s max score can’t beat the threshold.
Sourcepub fn current_block_idx(&self) -> usize
pub fn current_block_idx(&self) -> usize
Get the current block index
Sourcepub fn num_blocks(&self) -> usize
pub fn num_blocks(&self) -> usize
Get total number of blocks
Sourcepub fn current_block_max_tf(&self) -> u32
pub fn current_block_max_tf(&self) -> u32
Get the current block’s max term frequency for block-max pruning
Auto Trait Implementations§
impl<'a> !Freeze for BlockPostingIterator<'a>
impl<'a> RefUnwindSafe for BlockPostingIterator<'a>
impl<'a> Send for BlockPostingIterator<'a>
impl<'a> Sync for BlockPostingIterator<'a>
impl<'a> Unpin for BlockPostingIterator<'a>
impl<'a> UnsafeUnpin for BlockPostingIterator<'a>
impl<'a> UnwindSafe for BlockPostingIterator<'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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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