use async_trait::async_trait;
use crate::document::{Chunk, SearchResult};
use crate::error::Result;
#[async_trait]
pub trait VectorStore: Send + Sync {
async fn create_collection(&self, name: &str, dimensions: usize) -> Result<()>;
async fn delete_collection(&self, name: &str) -> Result<()>;
async fn upsert(&self, collection: &str, chunks: &[Chunk]) -> Result<()>;
async fn delete(&self, collection: &str, ids: &[&str]) -> Result<()>;
async fn search(
&self,
collection: &str,
embedding: &[f32],
top_k: usize,
) -> Result<Vec<SearchResult>>;
}