Skip to main content

VectorStore

Trait VectorStore 

Source
pub trait VectorStore: Send + Sync {
    // Required methods
    fn ensure_collection(
        &self,
        collection: &str,
        vector_size: u64,
    ) -> Pin<Box<dyn Future<Output = Result<(), VectorStoreError>> + Send + '_>>;
    fn collection_exists(
        &self,
        collection: &str,
    ) -> Pin<Box<dyn Future<Output = Result<bool, VectorStoreError>> + Send + '_>>;
    fn delete_collection(
        &self,
        collection: &str,
    ) -> Pin<Box<dyn Future<Output = Result<(), VectorStoreError>> + Send + '_>>;
    fn upsert(
        &self,
        collection: &str,
        points: Vec<VectorPoint>,
    ) -> Pin<Box<dyn Future<Output = Result<(), VectorStoreError>> + Send + '_>>;
    fn search(
        &self,
        collection: &str,
        vector: Vec<f32>,
        limit: u64,
        filter: Option<VectorFilter>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<ScoredVectorPoint>, VectorStoreError>> + Send + '_>>;
    fn delete_by_ids(
        &self,
        collection: &str,
        ids: Vec<String>,
    ) -> Pin<Box<dyn Future<Output = Result<(), VectorStoreError>> + Send + '_>>;
    fn scroll_all(
        &self,
        collection: &str,
        key_field: &str,
    ) -> Pin<Box<dyn Future<Output = Result<ScrollResult, VectorStoreError>> + Send + '_>>;
    fn health_check(
        &self,
    ) -> Pin<Box<dyn Future<Output = Result<bool, VectorStoreError>> + Send + '_>>;
}

Required Methods§

Source

fn ensure_collection( &self, collection: &str, vector_size: u64, ) -> Pin<Box<dyn Future<Output = Result<(), VectorStoreError>> + Send + '_>>

Source

fn collection_exists( &self, collection: &str, ) -> Pin<Box<dyn Future<Output = Result<bool, VectorStoreError>> + Send + '_>>

Source

fn delete_collection( &self, collection: &str, ) -> Pin<Box<dyn Future<Output = Result<(), VectorStoreError>> + Send + '_>>

Source

fn upsert( &self, collection: &str, points: Vec<VectorPoint>, ) -> Pin<Box<dyn Future<Output = Result<(), VectorStoreError>> + Send + '_>>

Source

fn search( &self, collection: &str, vector: Vec<f32>, limit: u64, filter: Option<VectorFilter>, ) -> Pin<Box<dyn Future<Output = Result<Vec<ScoredVectorPoint>, VectorStoreError>> + Send + '_>>

Source

fn delete_by_ids( &self, collection: &str, ids: Vec<String>, ) -> Pin<Box<dyn Future<Output = Result<(), VectorStoreError>> + Send + '_>>

Source

fn scroll_all( &self, collection: &str, key_field: &str, ) -> Pin<Box<dyn Future<Output = Result<ScrollResult, VectorStoreError>> + Send + '_>>

Source

fn health_check( &self, ) -> Pin<Box<dyn Future<Output = Result<bool, VectorStoreError>> + Send + '_>>

Implementors§