Trait VectorStore
Source pub trait VectorStore: Send + Sync {
// Required methods
fn add<'life0, 'async_trait>(
&'life0 self,
docs: Vec<Document>,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn search<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
query_embedding: &'life1 [f32],
top_k: usize,
filter: Option<&'life2 MetadataFilter>,
) -> Pin<Box<dyn Future<Output = Result<Vec<SearchResult>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
ids: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided methods
fn delete_strs<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ids: &'life1 [&'life2 str],
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: Sized + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn delete_ref<'life0, 'life1, 'async_trait, T>(
&'life0 self,
ids: &'life1 [T],
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where T: AsRef<str> + Sync + 'async_trait,
Self: Sized + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}