pub trait Column<T: PartialOrd + Debug = u64>: Send + Sync {
    fn get_val(&self, idx: u32) -> T;
    fn min_value(&self) -> T;
    fn max_value(&self) -> T;
    fn num_vals(&self) -> u32;

    fn get_range(&self, start: u64, output: &mut [T]) { ... }
    fn get_docids_for_value_range(
        &self,
        value_range: RangeInclusive<T>,
        doc_id_range: Range<u32>,
        positions: &mut Vec<u32>
    ) { ... } fn iter<'a>(&'a self) -> Box<dyn Iterator<Item = T> + 'a> { ... } }
Expand description

Column provides columnar access on a field.

Required Methods

Return the value associated with the given idx.

This accessor should return as fast as possible.

Panics

May panic if idx is greater than the column length.

Returns the minimum value for this fast field.

This min_value may not be exact. For instance, the min value does not take in account of possible deleted document. All values are however guaranteed to be higher than .min_value().

Returns the maximum value for this fast field.

This max_value may not be exact. For instance, the max value does not take in account of possible deleted document. All values are however guaranteed to be higher than .max_value().

The number of values in the column.

Provided Methods

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

Panics

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

Get the positions of values which are in the provided value range.

Note that position == docid for single value fast fields

Returns a iterator over the data

Implementations on Foreign Types

Implementors