pub struct DiskIndexReader<VectorType> { /* private fields */ }Expand description
This struct is used by the DiskIndexSearcher to read the index data from storage. Noted that the index data here is different from index graph, It includes the PQ data, pivot table, and the warmup query data. The Storage acts as a provider to read the data from storage system. The storage provider should be provided as a generic type and be specified by the caller when it initializes the DiskIndexSearcher.
Implementations§
Source§impl<VectorType> DiskIndexReader<VectorType>
impl<VectorType> DiskIndexReader<VectorType>
Sourcepub fn new<Storage: StorageReadProvider>(
pq_pivot_path: String,
pq_compressed_data_path: String,
storage_provider: &Storage,
) -> ANNResult<Self>
pub fn new<Storage: StorageReadProvider>( pq_pivot_path: String, pq_compressed_data_path: String, storage_provider: &Storage, ) -> ANNResult<Self>
Create DiskIndexReader instance
pub fn get_pq_data(&self) -> Arc<PQData>
pub fn get_num_points(&self) -> usize
Auto Trait Implementations§
impl<VectorType> Freeze for DiskIndexReader<VectorType>
impl<VectorType> RefUnwindSafe for DiskIndexReader<VectorType>where
VectorType: RefUnwindSafe,
impl<VectorType> Send for DiskIndexReader<VectorType>where
VectorType: Send,
impl<VectorType> Sync for DiskIndexReader<VectorType>where
VectorType: Sync,
impl<VectorType> Unpin for DiskIndexReader<VectorType>where
VectorType: Unpin,
impl<VectorType> UnwindSafe for DiskIndexReader<VectorType>where
VectorType: UnwindSafe,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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