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
Clear the server's collected performance issues.
Clear all payload from the selected points.
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 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 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.
Delete the snapshot snapshotName of collection name.
Delete the whole-storage snapshot snapshotName.
Delete the named vectors from the selected points.
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.
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.
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 collection name's snapshots.
List whole-storage snapshots.
Replace the selected points' payload with payload.
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).
Update the vectors of existing points, keeping their payload.
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.