Struct tantivy::SegmentReader [] [src]

pub struct SegmentReader {
    // some fields omitted
}

Methods

impl SegmentReader
[src]

fn max_doc(&self) -> DocId

Returns the highest document id ever attributed in this segment + 1. Today, tantivy does not handle deletes so, it happens to also be the number of documents in the index.

fn num_docs(&self) -> DocId

fn get_fast_field_reader(&self, field: Field) -> Result<U32FastFieldReader>

fn get_fieldnorms_reader(&self, field: Field) -> Result<U32FastFieldReader>

fn doc_freq(&self, term: &Term) -> u32

fn get_store_reader(&self) -> &StoreReader

fn open(segment: Segment) -> Result<SegmentReader>

Open a new segment for reading.

fn term_infos(&self) -> &FstMap<TermInfo>

fn doc(&self, doc_id: DocId) -> Result<Document>

Returns the document (or to be accurate, its stored field) bearing the given doc id. This method is slow and should seldom be called from within a collector.

fn read_postings(&self, term: &Term, option: SegmentPostingsOption) -> Option<SegmentPostings>

fn read_postings_all_info(&self, term: &Term) -> Option<SegmentPostings>

fn get_term_info<'a>(&'a self, term: &Term) -> Option<TermInfo>

Trait Implementations

impl Debug for SegmentReader
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.