BqSearchBackend

Trait BqSearchBackend 

Source
pub trait BqSearchBackend: Send + Sync {
    // Required methods
    fn is_ready(&self) -> impl Future<Output = bool> + Send;
    fn ensure_collection(
        &self,
        name: &str,
        vector_size: u64,
    ) -> impl Future<Output = Result<(), VectorDbError>> + Send;
    fn search_bq(
        &self,
        collection: &str,
        query: Vec<f32>,
        limit: u64,
        tenant_filter: Option<u64>,
    ) -> impl Future<Output = Result<Vec<SearchResult>, VectorDbError>> + Send;
    fn upsert_points(
        &self,
        collection: &str,
        points: Vec<VectorPoint>,
        consistency: WriteConsistency,
    ) -> impl Future<Output = Result<(), VectorDbError>> + Send;
}
Expand description

Backend required by the L2 cache for vector search + upsert.

Required Methods§

Source

fn is_ready(&self) -> impl Future<Output = bool> + Send

Returns true if the backend is ready for requests.

Source

fn ensure_collection( &self, name: &str, vector_size: u64, ) -> impl Future<Output = Result<(), VectorDbError>> + Send

Creates the collection if it doesn’t exist.

Source

fn search_bq( &self, collection: &str, query: Vec<f32>, limit: u64, tenant_filter: Option<u64>, ) -> impl Future<Output = Result<Vec<SearchResult>, VectorDbError>> + Send

Performs a search against the binary-quantized index.

Source

fn upsert_points( &self, collection: &str, points: Vec<VectorPoint>, consistency: WriteConsistency, ) -> impl Future<Output = Result<(), VectorDbError>> + Send

Upserts points into the collection.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl BqSearchBackend for BqBackend

Source§

impl BqSearchBackend for BqClient

Source§

impl BqSearchBackend for MockBqClient

Available on crate features mock only.