pub struct PooledConnection { /* private fields */ }Expand description
A pooled connection that releases back to the pool on drop.
Methods from Deref<Target = QdrantDriver>§
Sourcepub async fn search(
&mut self,
collection: &str,
vector: &[f32],
limit: u64,
score_threshold: Option<f32>,
) -> QdrantResult<Vec<ScoredPoint>>
pub async fn search( &mut self, collection: &str, vector: &[f32], limit: u64, score_threshold: Option<f32>, ) -> QdrantResult<Vec<ScoredPoint>>
Sourcepub async fn search_batch(
&mut self,
collection: &str,
vectors: &[Vec<f32>],
limit: u64,
score_threshold: Option<f32>,
) -> QdrantResult<Vec<Vec<ScoredPoint>>>
pub async fn search_batch( &mut self, collection: &str, vectors: &[Vec<f32>], limit: u64, score_threshold: Option<f32>, ) -> QdrantResult<Vec<Vec<ScoredPoint>>>
Search multiple vectors concurrently using HTTP/2 pipelining.
This sends all requests concurrently over a single h2 connection, achieving 2-3x speedup compared to sequential searches.
§Example
ⓘ
let vectors = vec![vec1, vec2, vec3];
let results = driver.search_batch("products", &vectors, 10, None).await?;Sourcepub async fn search_ast(&mut self, cmd: &Qail) -> QdrantResult<Vec<ScoredPoint>>
pub async fn search_ast(&mut self, cmd: &Qail) -> QdrantResult<Vec<ScoredPoint>>
Search using QAIL AST.
Extracts vector, collection, limit from the Qail command.
Sourcepub async fn upsert(
&mut self,
collection: &str,
points: &[Point],
wait: bool,
) -> QdrantResult<()>
pub async fn upsert( &mut self, collection: &str, points: &[Point], wait: bool, ) -> QdrantResult<()>
Upsert points with zero-copy encoding.
Sourcepub async fn create_collection(
&mut self,
collection_name: &str,
vector_size: u64,
distance: Distance,
on_disk: bool,
) -> QdrantResult<()>
pub async fn create_collection( &mut self, collection_name: &str, vector_size: u64, distance: Distance, on_disk: bool, ) -> QdrantResult<()>
Create a collection with specific vector parameters.
Sourcepub async fn delete_collection(
&mut self,
collection_name: &str,
) -> QdrantResult<()>
pub async fn delete_collection( &mut self, collection_name: &str, ) -> QdrantResult<()>
Delete a collection.
Sourcepub async fn delete_points(
&mut self,
collection_name: &str,
point_ids: &[u64],
) -> QdrantResult<()>
pub async fn delete_points( &mut self, collection_name: &str, point_ids: &[u64], ) -> QdrantResult<()>
Delete points by ID from a collection.
Trait Implementations§
Source§impl Deref for PooledConnection
impl Deref for PooledConnection
Auto Trait Implementations§
impl !Freeze for PooledConnection
impl !RefUnwindSafe for PooledConnection
impl Send for PooledConnection
impl Sync for PooledConnection
impl Unpin for PooledConnection
impl !UnwindSafe for PooledConnection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more