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]

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

Returns an empty segment postings object

Trait Implementations

impl<'a> DocSet for SegmentPostings<'a>
[src]

Goes to the next element. .advance(...) needs to be called a first time to point to the correct element. Read more

Returns the current document

After skipping, position the iterator in such a way that .doc() will return a value greater than or equal to target. Read more

Advances the cursor to the next document None is returned if the iterator has DocSet has already been entirely consumed. Read more

impl<'a> HasLen for SegmentPostings<'a>
[src]

Return length

Returns true iff empty.

impl<'a> Postings for SegmentPostings<'a>
[src]

Returns the term frequency

Returns the list of positions of the term, expressed as a list of token ordinals. Read more