pub mod exact;
pub mod sidecar;
use crate::error::Result;
pub trait VectorIndex: Send + Sync {
fn add(&mut self, row_id: &str, vector: &[f32]) -> Result<()>;
fn build(&mut self) -> Result<()>;
fn search(&self, query: &[f32], k: usize) -> Result<Vec<(String, f32)>>;
fn save(&self, path: &std::path::Path) -> Result<()>;
fn load(path: &std::path::Path) -> Result<Self>
where
Self: Sized;
fn len(&self) -> usize;
fn is_empty(&self) -> bool {
self.len() == 0
}
}