Trait tantivy::Postings [] [src]

pub trait Postings: DocSet {
    fn term_freq(&self) -> u32;
    fn positions(&self) -> &[u32];
}

Postings (also called inverted list)

For a given term, it is the list of doc ids of the doc containing the term. Optionally, for each document, it may also give access to the term frequency as well as the list of term positions.

Its main implementation is SegmentPostings, but other implementations mocking SegmentPostings exist, for merging segments or for testing.

Required Methods

Returns the term frequency

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

Implementors