pub trait VectorSearch:
Send
+ Sync
+ 'static {
// Required methods
fn index_embedding<'life0, 'async_trait>(
&'life0 self,
symbol_id: Uuid,
repo_id: Uuid,
embedding: Vec<f32>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn search_similar<'life0, 'async_trait>(
&'life0 self,
repo_id: Uuid,
query_embedding: Vec<f32>,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<VectorSearchResult>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_embedding<'life0, 'async_trait>(
&'life0 self,
symbol_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Trait for vector search backends.