pub struct IndexReader { /* private fields */ }Expand description
Opens an index for reading by loading all committed segments.
Implementations§
Source§impl IndexReader
impl IndexReader
Sourcepub fn open(storage: &dyn Storage) -> Result<Self>
pub fn open(storage: &dyn Storage) -> Result<Self>
Open an index from storage, loading all committed segments.
Per-field vector indexes live in their own extents (see
[[global-vector-indices]]) and are read separately
via crate::storage::Storage::read_vector_index.
Sourcepub fn into_segments(self) -> Vec<SegmentReader>
pub fn into_segments(self) -> Vec<SegmentReader>
Consume the reader and return the segment readers.
Sourcepub fn num_segments(&self) -> usize
pub fn num_segments(&self) -> usize
Number of loaded segments.
Sourcepub fn total_docs(&self) -> u32
pub fn total_docs(&self) -> u32
Total documents across all segments.
Auto Trait Implementations§
impl Freeze for IndexReader
impl RefUnwindSafe for IndexReader
impl Send for IndexReader
impl Sync for IndexReader
impl Unpin for IndexReader
impl UnsafeUnpin for IndexReader
impl UnwindSafe for IndexReader
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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 more