Skip to main content

VectorStore

Trait VectorStore 

Source
pub trait VectorStore:
    Send
    + Sync
    + 'static {
    // Required methods
    fn insert<'life0, 'life1, 'async_trait>(
        &'life0 self,
        subject_id: Uuid,
        kind: SubstrateKind,
        namespace: &'life1 str,
        embedding: Vec<f32>,
    ) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn insert_batch<'life0, 'async_trait>(
        &'life0 self,
        records: Vec<VectorRecord>,
    ) -> Pin<Box<dyn Future<Output = StorageResult<BatchWriteSummary>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn delete<'life0, 'async_trait>(
        &'life0 self,
        subject_id: Uuid,
    ) -> Pin<Box<dyn Future<Output = StorageResult<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn count<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = StorageResult<u64>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn search<'life0, 'async_trait>(
        &'life0 self,
        request: VectorSearchRequest,
    ) -> Pin<Box<dyn Future<Output = StorageResult<Vec<VectorSearchHit>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn info<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = StorageResult<VectorStoreInfo>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn rebuild<'life0, 'async_trait>(
        &'life0 self,
        scope: IndexRebuildScope,
    ) -> Pin<Box<dyn Future<Output = StorageResult<VectorStoreInfo>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn insert<'life0, 'life1, 'async_trait>( &'life0 self, subject_id: Uuid, kind: SubstrateKind, namespace: &'life1 str, embedding: Vec<f32>, ) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn insert_batch<'life0, 'async_trait>( &'life0 self, records: Vec<VectorRecord>, ) -> Pin<Box<dyn Future<Output = StorageResult<BatchWriteSummary>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn delete<'life0, 'async_trait>( &'life0 self, subject_id: Uuid, ) -> Pin<Box<dyn Future<Output = StorageResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn count<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = StorageResult<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn search<'life0, 'async_trait>( &'life0 self, request: VectorSearchRequest, ) -> Pin<Box<dyn Future<Output = StorageResult<Vec<VectorSearchHit>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn info<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = StorageResult<VectorStoreInfo>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn rebuild<'life0, 'async_trait>( &'life0 self, scope: IndexRebuildScope, ) -> Pin<Box<dyn Future<Output = StorageResult<VectorStoreInfo>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§