pub struct DiskAnnBackend { /* private fields */ }Expand description
DiskANN vector backend.
With diskann feature: uses ruvector-diskann (Vamana + PQ + mmap).
Without: brute-force linear scan stub.
Implementations§
Source§impl DiskAnnBackend
impl DiskAnnBackend
Sourcepub fn new(config: DiskAnnConfig) -> Self
pub fn new(config: DiskAnnConfig) -> Self
Create a new DiskANN backend with the given configuration.
Sourcepub fn with_defaults() -> Self
pub fn with_defaults() -> Self
Create with default configuration.
Sourcepub fn config(&self) -> &DiskAnnConfig
pub fn config(&self) -> &DiskAnnConfig
Borrow the configuration.
Trait Implementations§
Source§impl Debug for DiskAnnBackend
impl Debug for DiskAnnBackend
Source§impl VectorBackend for DiskAnnBackend
Available on crate feature diskann only.
impl VectorBackend for DiskAnnBackend
Available on crate feature
diskann only.Source§fn insert(
&self,
id: u64,
key: &str,
vector: &[f32],
_metadata: Value,
) -> VectorResult<()>
fn insert( &self, id: u64, key: &str, vector: &[f32], _metadata: Value, ) -> VectorResult<()>
Insert a vector with the given numeric ID, string key, and metadata. Read more
Source§fn backend_name(&self) -> &str
fn backend_name(&self) -> &str
Return a human-readable name for this backend (e.g. “hnsw”, “diskann”, “hybrid”).
Source§fn current_epoch(&self) -> u64
fn current_epoch(&self) -> u64
Return the current monotonic epoch. Read more
Source§fn soft_delete(&self, id: u64) -> bool
fn soft_delete(&self, id: u64) -> bool
Mark a vector as tombstoned instead of physically removing it. Read more
Source§fn compact(&self, older_than_epoch: u64) -> usize
fn compact(&self, older_than_epoch: u64) -> usize
Physically remove tombstones whose deletion epoch is older than
older_than_epoch. Returns the number of entries purged.Source§fn tombstone_count(&self) -> usize
fn tombstone_count(&self) -> usize
Return the number of tombstoned (soft-deleted) entries.
Source§fn max_vectors(&self) -> Option<usize>
fn max_vectors(&self) -> Option<usize>
Return the configured maximum number of vectors, or
None if
unbounded.Source§fn set_max_vectors(&self, limit: Option<usize>)
fn set_max_vectors(&self, limit: Option<usize>)
Set the maximum number of vectors. Pass
None for unbounded.Source§fn insert_with_epoch(
&self,
id: u64,
key: &str,
vector: &[f32],
metadata: Value,
parent_epoch: u64,
) -> VectorResult<()>
fn insert_with_epoch( &self, id: u64, key: &str, vector: &[f32], metadata: Value, parent_epoch: u64, ) -> VectorResult<()>
Insert a vector only if the store’s current epoch matches
parent_epoch. If the epoch has advanced past parent_epoch,
the call is rejected with VectorError::EpochConflict. Read moreAuto Trait Implementations§
impl !Freeze for DiskAnnBackend
impl RefUnwindSafe for DiskAnnBackend
impl Send for DiskAnnBackend
impl Sync for DiskAnnBackend
impl Unpin for DiskAnnBackend
impl UnsafeUnpin for DiskAnnBackend
impl UnwindSafe for DiskAnnBackend
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