[−][src]Struct tantivy::postings::BlockSegmentPostings
BlockSegmentPostings
is a cursor iterating over blocks
of documents.
Warning
While it is useful for some very specific high-performance
use cases, you should prefer using SegmentPostings
for most usage.
Methods
impl BlockSegmentPostings
[src]
pub fn doc_freq(&self) -> usize
[src]
Returns the document frequency associated to this block postings.
This doc_freq
is simply the sum of the length of all of the blocks
length, and it does not take in account deleted documents.
pub fn docs(&self) -> &[DocId]
[src]
Returns the array of docs in the current block.
Before the first call to .advance()
, the block
returned by .docs()
is empty.
pub fn doc(&self, idx: usize) -> u32
[src]
Return the document at index idx
of the block.
pub fn freqs(&self) -> &[u32]
[src]
Return the array of term freq
in the block.
pub fn freq(&self, idx: usize) -> u32
[src]
Return the frequency at index idx
of the block.
pub fn skip_to(&mut self, target_doc: DocId) -> BlockSegmentPostingsSkipResult
[src]
position on a block that may contains doc_id
.
Always advance the current block.
Returns true if a block that has an element greater or equal to the target is found. Returning true does not guarantee that the smallest element of the block is smaller than the target. It only guarantees that the last element is greater or equal.
Returns false iff all of the document remaining are smaller than
doc_id
. In that case, all of these document are consumed.
pub fn advance(&mut self) -> bool
[src]
Advance to the next block.
Returns false iff there was no remaining blocks.
pub fn empty() -> BlockSegmentPostings
[src]
Returns an empty segment postings object
Trait Implementations
impl<'b> Streamer<'b> for BlockSegmentPostings
[src]
Auto Trait Implementations
impl !Sync for BlockSegmentPostings
impl !Send for BlockSegmentPostings
impl Unpin for BlockSegmentPostings
impl !RefUnwindSafe for BlockSegmentPostings
impl !UnwindSafe for BlockSegmentPostings
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
[src]
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<'a, S> IntoStreamer<'a> for S where
S: Streamer<'a>,
[src]
S: Streamer<'a>,