pub struct FastFieldReader {
pub column_type: FastFieldColumnType,
pub num_docs: u32,
/* private fields */
}Expand description
Reads a single fast-field column from mmap/buffer with O(1) doc_id access.
Zero-copy: column data and text dictionary are borrowed slices of the
underlying mmap / OwnedBytes; no heap allocation per column.
Fields§
§column_type: FastFieldColumnType§num_docs: u32Implementations§
Source§impl FastFieldReader
impl FastFieldReader
Sourcepub fn open(file_data: &OwnedBytes, toc: &FastFieldTocEntry) -> Result<Self>
pub fn open(file_data: &OwnedBytes, toc: &FastFieldTocEntry) -> Result<Self>
Open a column from an OwnedBytes file buffer using a TOC entry.
Zero-copy: the returned reader borrows slices of file_data.
Sourcepub fn get_u64(&self, doc_id: u32) -> u64
pub fn get_u64(&self, doc_id: u32) -> u64
Get raw u64 value for a doc_id. Returns 0/sentinel for out-of-range.
Sourcepub fn get_ordinal(&self, doc_id: u32) -> u64
pub fn get_ordinal(&self, doc_id: u32) -> u64
Get the text ordinal for a doc_id. Returns TEXT_MISSING_ORDINAL if missing.
Sourcepub fn get_text(&self, doc_id: u32) -> Option<&str>
pub fn get_text(&self, doc_id: u32) -> Option<&str>
Get the text string for a doc_id (looks up ordinal in dictionary). Returns None if the doc has no value or ordinal is missing.
Sourcepub fn text_ordinal(&self, text: &str) -> Option<u64>
pub fn text_ordinal(&self, text: &str) -> Option<u64>
Look up text string → ordinal. Returns None if not found.
Sourcepub fn text_dict(&self) -> Option<&TextDictReader>
pub fn text_dict(&self) -> Option<&TextDictReader>
Access the text dictionary reader (if this is a text column).
Sourcepub fn bits_per_value(&self) -> u8
pub fn bits_per_value(&self) -> u8
Bits per value in this column.
Sourcepub fn raw_data(&self) -> &OwnedBytes
pub fn raw_data(&self) -> &OwnedBytes
Raw packed column bytes — for stackable merge (zero-copy).
Auto Trait Implementations§
impl Freeze for FastFieldReader
impl RefUnwindSafe for FastFieldReader
impl Send for FastFieldReader
impl Sync for FastFieldReader
impl Unpin for FastFieldReader
impl UnwindSafe for FastFieldReader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.