pub trait VectorIndexTrait: Send + Sync {
// Required methods
fn search_knn<'life0, 'life1, 'async_trait>(
&'life0 self,
query_vector: &'life1 [f32],
k: usize,
) -> Pin<Box<dyn Future<Output = GraphRAGResult<Vec<(String, f32)>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn search_threshold<'life0, 'life1, 'async_trait>(
&'life0 self,
query_vector: &'life1 [f32],
threshold: f32,
) -> Pin<Box<dyn Future<Output = GraphRAGResult<Vec<(String, f32)>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Trait for vector index operations
Required Methods§
Sourcefn search_knn<'life0, 'life1, 'async_trait>(
&'life0 self,
query_vector: &'life1 [f32],
k: usize,
) -> Pin<Box<dyn Future<Output = GraphRAGResult<Vec<(String, f32)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn search_knn<'life0, 'life1, 'async_trait>(
&'life0 self,
query_vector: &'life1 [f32],
k: usize,
) -> Pin<Box<dyn Future<Output = GraphRAGResult<Vec<(String, f32)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Search for k nearest neighbors
Sourcefn search_threshold<'life0, 'life1, 'async_trait>(
&'life0 self,
query_vector: &'life1 [f32],
threshold: f32,
) -> Pin<Box<dyn Future<Output = GraphRAGResult<Vec<(String, f32)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn search_threshold<'life0, 'life1, 'async_trait>(
&'life0 self,
query_vector: &'life1 [f32],
threshold: f32,
) -> Pin<Box<dyn Future<Output = GraphRAGResult<Vec<(String, f32)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Search with similarity threshold