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
fn term_freq(&self) -> u32
Returns the term frequency
fn positions(&self) -> &[u32]
Returns the list of positions of the term, expressed as a list of token ordinals.
Implementors
impl<TPostings: Postings> Postings for Box<TPostings>
impl<'a, TPostings: Postings> Postings for &'a mut TPostings
impl<'a> Postings for SegmentPostings<'a>