Struct tantivy::postings::SegmentPostings
[−]
[src]
pub struct SegmentPostings<'a> { /* 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<'a> SegmentPostings<'a>
[src]
fn from_data(len: u32,
data: &'a [u8],
freq_handler: FreqHandler)
-> SegmentPostings<'a>
data: &'a [u8],
freq_handler: FreqHandler)
-> SegmentPostings<'a>
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
fn empty() -> SegmentPostings<'static>
Returns an empty segment postings object
Trait Implementations
impl<'a> DocSet for SegmentPostings<'a>
[src]
fn advance(&mut self) -> bool
Goes to the next element. .advance(...)
needs to be called a first time to point to the correct element. Read more
fn doc(&self) -> DocId
Returns the current document
fn skip_next(&mut self, target: DocId) -> SkipResult
After skipping, position the iterator in such a way that .doc()
will return a value greater than or equal to target. Read more
fn next(&mut self) -> Option<DocId>
Advances the cursor to the next document None is returned if the iterator has DocSet
has already been entirely consumed. Read more