pub trait Column<T: PartialOrd + Debug = u64>: Send + Sync {
    // Required methods
    fn get_val(&self, idx: u32) -> T;
    fn min_value(&self) -> T;
    fn max_value(&self) -> T;
    fn num_vals(&self) -> u32;
    // Provided methods
    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§
Sourcefn get_val(&self, idx: u32) -> T
 
fn get_val(&self, idx: u32) -> T
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.
Sourcefn min_value(&self) -> T
 
fn min_value(&self) -> T
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().
Provided Methods§
Sourcefn get_range(&self, start: u64, output: &mut [T])
 
fn get_range(&self, start: u64, output: &mut [T])
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.
Sourcefn get_docids_for_value_range(
    &self,
    value_range: RangeInclusive<T>,
    doc_id_range: Range<u32>,
    positions: &mut Vec<u32>,
)
 
fn get_docids_for_value_range( &self, value_range: RangeInclusive<T>, doc_id_range: Range<u32>, positions: &mut Vec<u32>, )
Get the positions of values which are in the provided value range.
Note that position == docid for single value fast fields