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]

Returns an empty segment postings object

Creates a segment postings object with the given documents and no frequency encoded.

This method is mostly useful for unit tests.

It serializes the doc ids using tantivy's codec and returns a SegmentPostings object that embeds a buffer with the serialized data.

impl SegmentPostings
[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

Trait Implementations

impl DocSet for SegmentPostings
[src]

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

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

Returns a best-effort hint of the length of the docset. Read more

Return the current document's DocId.

Appends all docs to a bitset.

Fills a given mutable buffer with the next doc ids from the DocSet Read more

Returns the number documents matching. Read more

impl HasLen for SegmentPostings
[src]

Return length

Returns true iff empty.

impl Postings for SegmentPostings
[src]

Returns the term frequency

Returns the positions offseted with a given value. The output vector will be resized to the term_freq. Read more

Returns the positions of the term in the given document. The output vector will be resized to the term_freq. Read more

Auto Trait Implementations