QdrantClient
The user-facing Kdrant API. Coroutine-first: every operation is a suspend function.
Obtain an instance from a transport factory, e.g. Kdrant(host, port) { } in kdrant-transport-rest. Implements AutoCloseable — use it with use { }.
Every operation performs network I/O and may throw a KdrantException.
Functions
Apply a mixed sequence of point, vector and payload changes in one request, in the order given.
Clear the server's collected performance issues.
Clear all payload from the selected points.
How the collection's shards are spread across the cluster, as the answering peer sees it.
Whether a collection exists. Returns false (not an error) for a missing collection.
Create a collection.
Create a single-vector collection from just a size and distance — the common case.
Create a collection unless it already exists. Returns true if it was created, false if it already existed.
Create a payload field index so filtering on field scales. Without an index, filters do a full scan.
Create a payload field index, choosing the parameters that index type accepts.
Create a snapshot of a single shard rather than the whole collection.
Create a snapshot of the collection name; the returned SnapshotDescription.name identifies it for later download or recover.
Create a snapshot of the whole storage (all collections). See createSnapshot for the wait note.
Delete the points chosen by an already-built DeleteSelector — the form the framework adapters use, where the filter comes from a translator rather than the DSL.
Delete every point matching the given filter.
Delete points by id.
Delete a collection. Deleting a collection that does not exist is a no-op on the server.
Delete keys from the selected points' payload.
Delete a payload field index.
Drop a custom sharding key and the points in its shards. There is no undo.
Delete a shard snapshot.
Delete the snapshot snapshotName of collection name.
Delete the whole-storage snapshot snapshotName.
Delete the named vectors from the selected points.
Stream a shard snapshot's bytes as a cold Flow. See downloadSnapshot.
Stream a collection snapshot's bytes as a cold Flow, to save a backup without buffering the whole (potentially multi-GB) file in memory.
Stream a whole-storage snapshot's bytes as a cold Flow. See downloadSnapshot.
Create the collection if it is missing, and otherwise check that the one already there is the one asked for — the primitive a rerunnable bootstrap script needs.
Fetch a collection's status and point counts.
Fetch a collection's info, or null if it does not exist — instead of throwing KdrantException.CollectionNotFound.
Kubernetes-style health probe: true when the node is healthy. Returns false (rather than throwing) when the server responds not-healthy; still throws KdrantException.Transport if the server can't be reached at all.
Load a collection from a source larger than memory, and be able to carry on after being killed.
List every alias across all collections.
List the aliases pointing at name.
List all collection names on the server.
Detected performance issues as raw JSON (shape is server-version-specific).
List the snapshots of one shard.
List the collection name's snapshots.
List whole-storage snapshots.
Replace the selected points' payload with payload.
Recover one shard from a snapshot at location, leaving the collection's other shards alone.
Nearest-vector search.
Like QdrantClient.search, but decodes each hit's payload into T — the typical RAG read path.
Run several searches in a single request; returns the hits for each, in the order added.
Grouped search: return hits grouped by the groupBy payload field.
As searchMatrixPairs but in sparse-coordinate (offsets) form, compact for clustering input.
Sample points and return the pairwise distance matrix in pairs form (an explicit edge list).
Merge payload into the selected points' payload (existing keys are kept). Select the points with DeleteSelector.Ids(...) or DeleteSelector.ByFilter(filter { ... }).
Apply alias changes as one atomic batch — the primitive behind zero-downtime reindexing.
Update an existing collection's config (optimizers, HNSW, quantization).
Move, replicate or drop a shard.
Update the vectors of existing points, keeping their payload.
Upload a shard snapshot file (streamed from data) and recover that shard from it.
Upsert points into a collection.
Upsert points from a lazy Sequence, chunked by the engine (see the Flow overload).
Upsert points streamed from a Flow — ingest a large or unbounded source without materializing it all in memory. The engine chunks the flow to stay under the request-size cap; as with the DSL upsert, the chunks are applied sequentially and are not atomic across chunk boundaries.