pub struct IndexPersistenceManager<S> { /* private fields */ }Expand description
Index persistence manager for saving/loading indexes to object storage
Implementations§
Source§impl<S> IndexPersistenceManager<S>
impl<S> IndexPersistenceManager<S>
Source§impl<S: IndexStorage> IndexPersistenceManager<S>
impl<S: IndexStorage> IndexPersistenceManager<S>
Sourcepub async fn save_hnsw(
&self,
namespace: &NamespaceId,
index: &HnswIndex,
) -> Result<()>
pub async fn save_hnsw( &self, namespace: &NamespaceId, index: &HnswIndex, ) -> Result<()>
Save an HNSW index to storage
Sourcepub async fn load_hnsw(
&self,
namespace: &NamespaceId,
) -> Result<Option<HnswIndex>>
pub async fn load_hnsw( &self, namespace: &NamespaceId, ) -> Result<Option<HnswIndex>>
Load an HNSW index from storage
Sourcepub async fn save_pq(
&self,
namespace: &NamespaceId,
quantizer: &ProductQuantizer,
) -> Result<()>
pub async fn save_pq( &self, namespace: &NamespaceId, quantizer: &ProductQuantizer, ) -> Result<()>
Save a ProductQuantizer to storage
Sourcepub async fn load_pq(
&self,
namespace: &NamespaceId,
) -> Result<Option<ProductQuantizer>>
pub async fn load_pq( &self, namespace: &NamespaceId, ) -> Result<Option<ProductQuantizer>>
Load a ProductQuantizer from storage
Sourcepub async fn save_ivf(
&self,
namespace: &NamespaceId,
index: &IvfIndex,
) -> Result<()>
pub async fn save_ivf( &self, namespace: &NamespaceId, index: &IvfIndex, ) -> Result<()>
Save an IVF index to storage
Sourcepub async fn load_ivf(
&self,
namespace: &NamespaceId,
) -> Result<Option<IvfIndex>>
pub async fn load_ivf( &self, namespace: &NamespaceId, ) -> Result<Option<IvfIndex>>
Load an IVF index from storage
Sourcepub async fn save_spfresh(
&self,
namespace: &NamespaceId,
index: &SpFreshIndex,
) -> Result<()>
pub async fn save_spfresh( &self, namespace: &NamespaceId, index: &SpFreshIndex, ) -> Result<()>
Save an SPFresh index to storage
Sourcepub async fn load_spfresh(
&self,
namespace: &NamespaceId,
) -> Result<Option<SpFreshIndex>>
pub async fn load_spfresh( &self, namespace: &NamespaceId, ) -> Result<Option<SpFreshIndex>>
Load an SPFresh index from storage
Sourcepub async fn index_exists(
&self,
namespace: &NamespaceId,
index_type: IndexType,
) -> Result<bool>
pub async fn index_exists( &self, namespace: &NamespaceId, index_type: IndexType, ) -> Result<bool>
Check if an index exists in storage
Sourcepub async fn delete_index(
&self,
namespace: &NamespaceId,
index_type: IndexType,
) -> Result<bool>
pub async fn delete_index( &self, namespace: &NamespaceId, index_type: IndexType, ) -> Result<bool>
Delete an index from storage
Sourcepub async fn list_indexes(
&self,
namespace: &NamespaceId,
) -> Result<Vec<IndexType>>
pub async fn list_indexes( &self, namespace: &NamespaceId, ) -> Result<Vec<IndexType>>
List all indexes for a namespace
Auto Trait Implementations§
impl<S> Freeze for IndexPersistenceManager<S>where
S: Freeze,
impl<S> RefUnwindSafe for IndexPersistenceManager<S>where
S: RefUnwindSafe,
impl<S> Send for IndexPersistenceManager<S>where
S: Send,
impl<S> Sync for IndexPersistenceManager<S>where
S: Sync,
impl<S> Unpin for IndexPersistenceManager<S>where
S: Unpin,
impl<S> UnsafeUnpin for IndexPersistenceManager<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for IndexPersistenceManager<S>where
S: 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