Struct tantivy::postings::SegmentPostings
[−]
[src]
pub struct SegmentPostings { /* fields omitted */ }
SegmentPostings
represents the inverted list or postings associated to
a term in a Segment
.
As we iterate through the SegmentPostings
, the frequencies are optionally decoded.
Positions on the other hand, are optionally entirely decoded upfront.
Methods
impl SegmentPostings
[src]
pub fn from_block_postings(
segment_block_postings: BlockSegmentPostings,
delete_bitset: DeleteBitSet,
positions_stream_opt: Option<CompressedIntStream>
) -> SegmentPostings
[src]
segment_block_postings: BlockSegmentPostings,
delete_bitset: DeleteBitSet,
positions_stream_opt: Option<CompressedIntStream>
) -> SegmentPostings
Reads a Segment postings from an &[u8]
len
- number of document in the posting lists.data
- data array. The complete data is not necessarily used.freq_handler
- the freq handler is in charge of decoding frequencies and/or positions
pub fn empty() -> SegmentPostings
[src]
Returns an empty segment postings object
Trait Implementations
impl DocSet for SegmentPostings
[src]
fn advance(&mut self) -> bool
[src]
Goes to the next element. .advance(...)
needs to be called a first time to point to the correct element. Read more
fn skip_next(&mut self, target: DocId) -> SkipResult
[src]
After skipping, position the iterator in such a way that .doc()
will return a value greater than or equal to target. Read more
fn size_hint(&self) -> u32
[src]
Returns a best-effort hint of the length of the docset. Read more
fn doc(&self) -> DocId
[src]
Return the current document's DocId
.
fn append_to_bitset(&mut self, bitset: &mut BitSet)
[src]
Appends all docs to a bitset
.
fn fill_buffer(&mut self, buffer: &mut [DocId]) -> usize
[src]
Fills a given mutable buffer with the next doc ids from the DocSet
Read more
fn next(&mut self) -> Option<DocId>
[src]
Advances the cursor to the next document None is returned if the iterator has DocSet
has already been entirely consumed. Read more