Struct tantivy::InvertedIndexReader [] [src]

pub struct InvertedIndexReader { /* fields omitted */ }

The inverted index reader is in charge of accessing the inverted index associated to a specific field.

Note

It is safe to delete the segment associated to an InvertedIndexReader. As long as it is open, the ReadOnlySource it is relying on should stay available.

InvertedIndexReader are created by calling the SegmentReader's [.inverted_index(...)] method

Methods

impl InvertedIndexReader
[src]

[src]

Returns the term info associated with the term.

[src]

Return the term dictionary datastructure.

[src]

Resets the block segment to another position of the postings file.

This is useful for enumerating through a list of terms, and consuming the associated posting lists while avoiding reallocating a BlockSegmentPostings.

Warning

This does not reset the positions list.

[src]

Returns a block postings given a term_info. This method is for an advanced usage only.

Most user should prefer using read_postings instead.

[src]

Returns a posting object given a term_info. This method is for an advanced usage only.

Most user should prefer using read_postings instead.

[src]

Returns the segment postings associated with the term, and with the given option, or None if the term has never been encountered and indexed.

If the field was not indexed with the indexing options that cover the requested options, the returned SegmentPostings the method does not fail and returns a SegmentPostings with as much information as possible.

For instance, requesting IndexRecordOption::Freq for a TextIndexingOptions that does not index position will return a SegmentPostings with DocIds and frequencies.

[src]

Returns the number of documents containing the term.