Trait VectorStore
Source pub trait VectorStore: Send + Sync {
// Required methods
fn ensure_collection(
&self,
collection: &str,
vector_size: u64,
) -> Pin<Box<dyn Future<Output = Result<(), VectorStoreError>> + Send + '_>>;
fn collection_exists(
&self,
collection: &str,
) -> Pin<Box<dyn Future<Output = Result<bool, VectorStoreError>> + Send + '_>>;
fn delete_collection(
&self,
collection: &str,
) -> Pin<Box<dyn Future<Output = Result<(), VectorStoreError>> + Send + '_>>;
fn upsert(
&self,
collection: &str,
points: Vec<VectorPoint>,
) -> Pin<Box<dyn Future<Output = Result<(), VectorStoreError>> + Send + '_>>;
fn search(
&self,
collection: &str,
vector: Vec<f32>,
limit: u64,
filter: Option<VectorFilter>,
) -> Pin<Box<dyn Future<Output = Result<Vec<ScoredVectorPoint>, VectorStoreError>> + Send + '_>>;
fn delete_by_ids(
&self,
collection: &str,
ids: Vec<String>,
) -> Pin<Box<dyn Future<Output = Result<(), VectorStoreError>> + Send + '_>>;
fn scroll_all(
&self,
collection: &str,
key_field: &str,
) -> Pin<Box<dyn Future<Output = Result<ScrollResult, VectorStoreError>> + Send + '_>>;
fn health_check(
&self,
) -> Pin<Box<dyn Future<Output = Result<bool, VectorStoreError>> + Send + '_>>;
}