Trait tantivy::fastfield::FastFieldReader
source · [−]pub trait FastFieldReader<Item: FastValue>: Clone {
fn get(&self, doc: DocId) -> Item;
fn get_range(&self, start: u64, output: &mut [Item]);
fn min_value(&self) -> Item;
fn max_value(&self) -> Item;
}
Expand description
FastFieldReader is the trait to access fast field data.
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
fn get_range(&self, start: u64, output: &mut [Item])
fn get_range(&self, start: u64, output: &mut [Item])
Fills an output buffer with the fast field values
associated with the DocId
going from
start
to start + output.len()
.
Regardless of the type of Item
, this method works
- transmuting the output array
- extracting the
Item
s as if they wereu64
- possibly converting the
u64
value to the right type.
Panics
May panic if start + output.len()
is greater than
the segment’s maxdoc
.
Returns the minimum value for this fast field.
The min value does not take in account of possible deleted document, and should be considered as a lower bound of the actual mimimum value.