pub trait VectorStore:
Send
+ Sync
+ 'static {
// Required methods
fn upsert<'life0, 'async_trait>(
&'life0 self,
id: String,
vector: Vec<f32>,
payload: Message,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn search<'life0, 'async_trait>(
&'life0 self,
query: Vec<f32>,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<VectorSearchResult>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn clear<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Persists and searches embedding vectors.
Required Methods§
Sourcefn upsert<'life0, 'async_trait>(
&'life0 self,
id: String,
vector: Vec<f32>,
payload: Message,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn upsert<'life0, 'async_trait>(
&'life0 self,
id: String,
vector: Vec<f32>,
payload: Message,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Upserts a vector and payload.