pub struct PooledConnection { /* private fields */ }Expand description
A pooled connection that returns itself to the idle queue 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>>
Vector similarity search with zero-copy encoding.
§Performance
Vector is encoded via memcpy (no per-element serialization).
Sourcepub async fn search_named(
&mut self,
collection: &str,
vector_name: &str,
vector: &[f32],
limit: u64,
score_threshold: Option<f32>,
) -> QdrantResult<Vec<ScoredPoint>>
pub async fn search_named( &mut self, collection: &str, vector_name: &str, vector: &[f32], limit: u64, score_threshold: Option<f32>, ) -> QdrantResult<Vec<ScoredPoint>>
Vector search with named vector field.
Sourcepub async fn search_with_request(
&mut self,
request: SearchRequest<'_>,
) -> QdrantResult<Vec<ScoredPoint>>
pub async fn search_with_request( &mut self, request: SearchRequest<'_>, ) -> QdrantResult<Vec<ScoredPoint>>
Vector similarity search using the shared search request options.
Sourcepub async fn search_filtered(
&mut self,
collection: &str,
vector: &[f32],
limit: u64,
score_threshold: Option<f32>,
conditions: &[Condition],
is_or: bool,
) -> QdrantResult<Vec<ScoredPoint>>
pub async fn search_filtered( &mut self, collection: &str, vector: &[f32], limit: u64, score_threshold: Option<f32>, conditions: &[Condition], is_or: bool, ) -> QdrantResult<Vec<ScoredPoint>>
Filtered vector search using QAIL AST conditions.
Translates QAIL conditions into Qdrant’s protobuf filter (must/should) and includes them in the gRPC search request.
Sourcepub async fn search_filtered_grouped(
&mut self,
request: SearchRequest<'_>,
must_conditions: &[Condition],
should_conditions: &[Condition],
) -> QdrantResult<Vec<ScoredPoint>>
pub async fn search_filtered_grouped( &mut self, request: SearchRequest<'_>, must_conditions: &[Condition], should_conditions: &[Condition], ) -> QdrantResult<Vec<ScoredPoint>>
Filtered vector search with grouped conditions.
must_conditions are joined with AND, should_conditions with OR.
Sourcepub async fn search_filtered_grouped_cages(
&mut self,
request: SearchRequest<'_>,
must_conditions: &[Condition],
should_groups: &[Vec<Condition>],
) -> QdrantResult<Vec<ScoredPoint>>
pub async fn search_filtered_grouped_cages( &mut self, request: SearchRequest<'_>, must_conditions: &[Condition], should_groups: &[Vec<Condition>], ) -> QdrantResult<Vec<ScoredPoint>>
Filtered vector search preserving OR-cage groups.
Each OR group is treated as its own disjunction that must be satisfied.
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. If conditions are present in the AST, they are included as filters.
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 get_points(
&mut self,
collection: &str,
ids: &[PointId],
with_vectors: bool,
) -> QdrantResult<Vec<ScoredPoint>>
pub async fn get_points( &mut self, collection: &str, ids: &[PointId], with_vectors: bool, ) -> QdrantResult<Vec<ScoredPoint>>
Get points by ID (with payload and optional vectors).
Sourcepub async fn scroll(
&mut self,
collection: &str,
limit: u32,
offset: Option<&PointId>,
with_vectors: bool,
) -> QdrantResult<ScrollResult>
pub async fn scroll( &mut self, collection: &str, limit: u32, offset: Option<&PointId>, with_vectors: bool, ) -> QdrantResult<ScrollResult>
Scroll through points (paginated iteration).
Sourcepub async fn scroll_filtered_grouped_cages(
&mut self,
collection: &str,
limit: u32,
offset: Option<&PointId>,
with_vectors: bool,
must_conditions: &[Condition],
should_groups: &[Vec<Condition>],
) -> QdrantResult<ScrollResult>
pub async fn scroll_filtered_grouped_cages( &mut self, collection: &str, limit: u32, offset: Option<&PointId>, with_vectors: bool, must_conditions: &[Condition], should_groups: &[Vec<Condition>], ) -> QdrantResult<ScrollResult>
Scroll through points with QAIL AST filters.
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 numeric IDs.
Sourcepub async fn delete_points_by_id(
&mut self,
collection_name: &str,
ids: &[PointId],
) -> QdrantResult<()>
pub async fn delete_points_by_id( &mut self, collection_name: &str, ids: &[PointId], ) -> QdrantResult<()>
Delete points by PointId (supports both numeric and UUID).
Sourcepub async fn update_payload(
&mut self,
collection: &str,
point_ids: &[PointId],
payload: &Payload,
wait: bool,
) -> QdrantResult<()>
pub async fn update_payload( &mut self, collection: &str, point_ids: &[PointId], payload: &Payload, wait: bool, ) -> QdrantResult<()>
Update payload on existing points.
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 create_field_index(
&mut self,
collection: &str,
field_name: &str,
field_type: FieldType,
wait: bool,
) -> QdrantResult<()>
pub async fn create_field_index( &mut self, collection: &str, field_name: &str, field_type: FieldType, wait: bool, ) -> QdrantResult<()>
Create a payload field index for faster filtering.