pub struct InvertedIndexReader { /* private fields */ }
Expand description

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

Note

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

InvertedIndexReader are created by calling SegmentReader::inverted_index().

Implementations

Creates an empty InvertedIndexReader object, which contains no terms at all.

Returns the term info associated with the term.

Return the term dictionary datastructure.

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.

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

Most users should prefer using Self::read_postings() instead.

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

Most users should prefer using Self::read_postings() instead.

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

Most users should prefer using Self::read_postings() instead.

Returns the total number of tokens recorded for all documents (including deleted documents).

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::WithFreqs for a TextOptions that does not index position will return a SegmentPostings with DocIds and frequencies.

Returns the number of documents containing the term.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more
Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more
Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more
Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more
Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.