pub trait IncrementalVectorIndex: Send + Sync {
// Required methods
fn upsert_vector(&mut self, id: String, vector: Vector) -> Result<()>;
fn remove_vector(&mut self, id: &str) -> Result<bool>;
fn batch_upsert(
&mut self,
vectors: Vec<(String, Vector)>,
) -> Result<Vec<Result<()>>>;
fn get_statistics(&self) -> IndexStatistics;
fn optimize(&mut self) -> Result<()>;
fn health_check(&self) -> Result<HealthStatus>;
}
Expand description
Trait for incremental vector indices
Required Methods§
Sourcefn upsert_vector(&mut self, id: String, vector: Vector) -> Result<()>
fn upsert_vector(&mut self, id: String, vector: Vector) -> Result<()>
Insert or update a vector
Sourcefn remove_vector(&mut self, id: &str) -> Result<bool>
fn remove_vector(&mut self, id: &str) -> Result<bool>
Remove a vector
Sourcefn batch_upsert(
&mut self,
vectors: Vec<(String, Vector)>,
) -> Result<Vec<Result<()>>>
fn batch_upsert( &mut self, vectors: Vec<(String, Vector)>, ) -> Result<Vec<Result<()>>>
Batch upsert vectors
Sourcefn get_statistics(&self) -> IndexStatistics
fn get_statistics(&self) -> IndexStatistics
Get index statistics
Sourcefn health_check(&self) -> Result<HealthStatus>
fn health_check(&self) -> Result<HealthStatus>
Check index health