Struct tantivy::SegmentReader [] [src]

pub struct SegmentReader { /* fields omitted */ }

Entry point to access all of the datastructures of the Segment

The segment reader has a very low memory footprint, as close to all of the memory data is mmapped.

Methods

impl SegmentReader
[src]

[src]

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.

[src]

Returns the number of documents. Deleted documents are not counted.

Today, tantivy does not handle deletes so max doc and num_docs are the same.

[src]

Return the number of documents that have been deleted in the segment.

[src]

Accessor to a segment's fast field reader given a field.

Returns the u64 fast value reader if the field is a u64 field indexed as "fast".

Return a FastFieldNotAvailableError if the field is not declared as a fast field in the schema.

Panics

May panic if the index is corrupted.

[src]

Accessor to the FacetReader associated to a given Field.

[src]

Accessor to the MultiValueIntFastFieldReader associated to a given Field.

[src]

Accessor to the segment's Field norms's reader.

Field norms are the length (in tokens) of the fields. It is used in the computation of the [TfIdf] (https://fulmicoton.gitbooks.io/tantivy-doc/content/tfidf.html).

They are simply stored as a fast field, serialized in the .fieldnorm file of the segment.

[src]

Accessor to the segment's StoreReader.

[src]

Open a new segment for reading.

[src]

Returns a field reader associated to the field given in argument.

The field reader is in charge of iterating through the term dictionary associated to a specific field, and opening the posting list associated to any term.

[src]

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.

[src]

Returns the segment id

[src]

Returns the bitset representing the documents that have been deleted.

[src]

Returns true iff the doc is marked as deleted.

Trait Implementations

impl Clone for SegmentReader
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for SegmentReader
[src]

[src]

Formats the value using the given formatter. Read more