Struct tantivy::postings::BlockSegmentPostings
[−]
[src]
pub struct BlockSegmentPostings { /* fields omitted */ }
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 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