Trait tantivy::fastfield::FastFieldReader [] [src]

pub trait FastFieldReader: Sized {
    type ValueType;
    fn get(&self, doc: DocId) -> Self::ValueType;
fn get_range(&self, start: u32, output: &mut [Self::ValueType]);
fn open(source: ReadOnlySource) -> Self;
fn is_enabled(field_type: &FieldType) -> bool; }

Trait for accessing a fastfield.

Depending on the field type, a different fast field is required.

Associated Types

Type of the value stored in the fastfield.

Required Methods

Return the value associated to the given document.

This accessor should return as fast as possible.

Panics

May panic if doc is greater than the segment

Fills an output buffer with the fast field values associated with the DocId going from start to start + output.len().

Panics

May panic if start + output.len() is greater than the segment's maxdoc.

Opens a fast field given a source.

Returns true iff the given field_type makes it possible to access the field values via a fastfield.

Implementors