Package-level declarations

Types

Link copied to clipboard
@Serializable
data class AliasDescription(val aliasName: String, val collectionName: String)

One alias→collection mapping, as returned by listAliases / listCollectionAliases.

Link copied to clipboard
@Serializable(with = AliasOperationSerializer::class)
sealed interface AliasOperation

A single change applied by updateAliases. All operations in one call are applied atomically, which is what makes a zero-downtime reindex possible (build a new collection, then swap the alias).

Link copied to clipboard
@Serializable(with = ClusterOperationSerializer::class)
sealed interface ClusterOperation

A change to a collection's shard placement, applied through POST /collections/{name}/cluster.

Link copied to clipboard
@Serializable
data class CollectionClusterInfo(val peerId: Long, val shardCount: Int = 0, val localShards: List<LocalShardInfo> = emptyList(), val remoteShards: List<RemoteShardInfo> = emptyList(), val shardTransfers: List<ShardTransferInfo> = emptyList())

How a collection's shards are distributed right now, as the answering peer sees it.

Link copied to clipboard
@Serializable
data class CollectionConfig(val params: CollectionParams? = null)

A collection's stored configuration, as returned by getCollection.

Link copied to clipboard
@Serializable
data class CollectionDescription(val name: String)

A collection's name, as returned by listCollections.

Link copied to clipboard
@Serializable
data class CollectionInfo(val status: CollectionStatus = CollectionStatus.UNKNOWN, val pointsCount: Long? = null, val indexedVectorsCount: Long? = null, val segmentsCount: Int? = null, val config: CollectionConfig? = null, val payloadSchema: Map<String, PayloadIndexInfo> = emptyMap())

Summary of a collection returned by getCollection.

Link copied to clipboard
@Serializable
data class CollectionParams(val vectors: VectorsConfig? = null, val sparseVectors: Map<String, SparseVectorParams>? = null, val shardNumber: Int? = null, val replicationFactor: Int? = null, val writeConsistencyFactor: Int? = null, val onDiskPayload: Boolean? = null)

The vector and sharding parameters a collection was created with.

Link copied to clipboard

Optimization/health status of a collection. Unrecognized values (from a newer server) decode to UNKNOWN rather than failing the whole response.

Link copied to clipboard
@Serializable(with = ConditionSerializer::class)
sealed interface Condition

A single filter condition. Most conditions target a payload Field with a FieldMatcher; the rest cover Qdrant's special conditions (is_empty, is_null, has_id, has_vector, nested) and recursive nesting of a whole Filter via Sub.

Link copied to clipboard
data class ContextPair(val positive: VectorInput, val negative: VectorInput)

A positive/negative example pair for discovery and context search.

Link copied to clipboard
@Serializable
data class CreateCollectionRequest(val vectors: VectorsConfig? = null, val sparseVectors: Map<String, SparseVectorParams>? = null, val hnswConfig: HnswConfig? = null, val onDiskPayload: Boolean? = null, val shardNumber: Int? = null, val replicationFactor: Int? = null, val optimizersConfig: OptimizersConfig? = null, val quantizationConfig: QuantizationConfig? = null, val strictModeConfig: StrictModeConfig? = null)

Request body for PUT /collections/{name}.

Link copied to clipboard
@Serializable
data class CreateShardKeyRequest(val shardKey: ShardKey, val shardsNumber: Int? = null, val replicationFactor: Int? = null, val placement: List<Long>? = null)

Request body for PUT /collections/{name}/shards.

Link copied to clipboard
data class DecayParams(val x: Expression, val target: Expression? = null, val scale: Double? = null, val midpoint: Double? = null)

Shape of a decay curve. The output is 1.0 at target and midpoint once x is scale away from it.

Link copied to clipboard
sealed interface DeleteSelector

Selects which points a delete targets: an explicit id list or a filter.

Link copied to clipboard
@Serializable
enum Direction : Enum<Direction>

Sort direction for QueryInterface.OrderBy and for an ordered dev.kdrant.model.ScrollRequest. Qdrant spells these lowercase on the wire.

Link copied to clipboard
@Serializable
enum Distance : Enum<Distance>

Vector distance metric. Wire values match Qdrant exactly.

Link copied to clipboard
@Serializable(with = ExpressionSerializer::class)
sealed interface Expression

An arithmetic expression over a point's score and payload, evaluated by Qdrant to rerank the candidates a Prefetch produced.

Link copied to clipboard
@Serializable
data class FacetHit(val value: FacetValue, val count: Long)

A distinct value of a faceted payload key together with how many points carry it. Returned by facet, ordered by descending count.

Link copied to clipboard
@Serializable(with = FacetValueSerializer::class)
sealed interface FacetValue

A facet value: Qdrant returns a payload key's distinct values as a string, integer, or boolean.

Link copied to clipboard
sealed interface FieldMatcher

The matcher applied to a payload field inside a Condition.Field. Each variant maps to exactly one Qdrant condition block (match, range, values_count, geo_*), mirroring the Qdrant filter model.

Link copied to clipboard
@Serializable
data class Filter(val must: List<Condition>? = null, val should: List<Condition>? = null, val mustNot: List<Condition>? = null, val minShould: MinShould? = null)

A Qdrant filter: four independent, combinable clauses. Each holds a list of Conditions and clauses can nest recursively (a condition can itself be a whole Filter — see Condition.Sub), so any boolean expression is expressible.

Link copied to clipboard

Fusion algorithm combining the results of several Prefetch sources.

Link copied to clipboard
@Serializable
data class GeoPoint(val lon: Double, val lat: Double)

A geographic point. Note Qdrant's field order: longitude then latitude.

Link copied to clipboard
@Serializable
data class HnswConfig(val m: Int? = null, val efConstruct: Int? = null, val fullScanThreshold: Int? = null, val maxIndexingThreads: Int? = null, val onDisk: Boolean? = null, val payloadM: Int? = null)

HNSW index tuning. All fields are optional; omitted ones fall back to Qdrant's defaults. Can be set collection-wide or overridden per named vector.

Link copied to clipboard
@Serializable(with = InferenceInputSerializer::class)
sealed interface InferenceInput

What the server should embed, and with which model.

Link copied to clipboard
@Serializable
data class LocalShardInfo(val shardId: Int, val shardKey: ShardKey? = null, val pointsCount: Long = 0, val state: ReplicaState = ReplicaState.UNKNOWN)

A shard served by the node that answered the request.

Link copied to clipboard
@Serializable
data class LookupLocation(val collection: String, val vector: String? = null)

Where to look up a point's vector for SearchRequest.lookupFrom: a collection and optional vector name.

Link copied to clipboard
@Serializable
data class MinShould(val conditions: List<Condition>, val minCount: Int)

The min_should clause: at least minCount of conditions must match.

Link copied to clipboard
@Serializable
data class Mmr(val diversity: Float? = null, val candidatesLimit: Int? = null)

Maximal Marginal Relevance reranking, applied after a nearest search using the same query vector.

Link copied to clipboard
@Serializable
enum Modifier : Enum<Modifier>

Query-time modification applied to sparse-vector values.

Link copied to clipboard

How multi-vectors are compared.

Link copied to clipboard
@Serializable
data class MultiVectorConfig(val comparator: MultiVectorComparator)

Config enabling multi-vector (late-interaction / ColBERT) storage on a dense vector.

Link copied to clipboard
@Serializable
data class OptimizersConfig(val defaultSegmentNumber: Int? = null, val indexingThreshold: Int? = null, val memmapThreshold: Int? = null, val flushIntervalSec: Int? = null, val maxOptimizationThreads: Int? = null, val deletedThreshold: Double? = null, val vacuumMinVectorNumber: Int? = null, val maxSegmentSize: Int? = null)

Optimizer tuning for a collection. All fields are optional; on create, omitted ones use Qdrant's defaults; on update, omitted ones keep the current value.

Link copied to clipboard
@Serializable
data class OrderBy(val key: String, val direction: Direction? = null, val startFrom: JsonPrimitive? = null)

Ordering for a scroll: a payload key, a direction, and the value to resume from.

Link copied to clipboard
typealias Payload = JsonObject

A point payload: an arbitrary JSON object with heterogeneous values (strings, numbers, booleans, arrays, nested objects). Kept as a JsonObject rather than a fixed schema, since Qdrant payloads are schemaless; typed access is left to the caller.

Link copied to clipboard
@Serializable
data class PayloadIndexInfo(val dataType: String? = null, val points: Long? = null)

What kind of index exists on a payload field, and how many points it covers.

Link copied to clipboard
@Serializable
sealed interface PayloadIndexParams

The parameters Qdrant accepts beside the index type, one shape per type.

Link copied to clipboard

Payload field index type for createPayloadIndex. Indexing a field makes filtering on it scale.

Link copied to clipboard
@Serializable
data class PointGroup(val id: JsonPrimitive, val hits: List<ScoredPoint>, val lookup: Record? = null)

A group of hits sharing the same group_by value, returned by searchGroups.

Link copied to clipboard
@Serializable(with = PointIdSerializer::class)
sealed interface PointId

A Qdrant point identifier. Qdrant accepts exactly two forms: an unsigned 64-bit integer or a UUID string. Modelled as a sealed type so the two cases are impossible to confuse.

Link copied to clipboard
@Serializable
data class PointStruct(val id: PointId, val vector: VectorData, val payload: Payload? = null)

A single point to upsert: an id, its vector, and an optional payload.

Link copied to clipboard
sealed interface PointsUpdateOperation

One step of a batchUpdate: a point, vector or payload change that Qdrant applies as part of a single ordered request.

Link copied to clipboard
@Serializable
data class PointVectors(val id: PointId, val vector: VectorData)

A point's id and the vector(s) to write, for updateVectors.

Link copied to clipboard
@Serializable
data class Prefetch(val prefetch: List<Prefetch>? = null, val query: QueryInterface? = null, val using: String? = null, val filter: Filter? = null, val limit: Int? = null, val scoreThreshold: Double? = null, val params: SearchParams? = null, val lookupFrom: LookupLocation? = null)

A prefetch sub-request: candidates fetched first, then combined or reranked by the outer SearchRequest.query. Prefetches nest recursively for multi-stage retrieval.

Link copied to clipboard
sealed interface QuantizationConfig

Vector quantization, to shrink a collection's memory footprint. Build with Scalar or Binary.

Link copied to clipboard
@Serializable(with = QueryInterfaceSerializer::class)
sealed interface QueryInterface

The query of a /points/query request: what to do with the (optionally prefetched) candidates.

Link copied to clipboard

How QueryInterface.Recommend uses positive/negative examples. Default (null) is average-vector.

Link copied to clipboard
@Serializable
data class Record(val id: PointId, val payload: Payload? = null, val vector: VectorData? = null, val orderValue: JsonPrimitive? = null)

A point returned by scroll (no similarity score).

Link copied to clipboard
@Serializable
data class RemoteShardInfo(val shardId: Int, val shardKey: ShardKey? = null, val peerId: Long, val state: ReplicaState = ReplicaState.UNKNOWN)

A shard served by another peer.

Link copied to clipboard

State of one shard within a replica set. An unrecognized state from a newer server decodes to UNKNOWN rather than failing the whole cluster-info response.

Link copied to clipboard
@Serializable
data class ScoredPoint(val id: PointId, val score: Float, val version: Long? = null, val payload: Payload? = null, val vector: VectorData? = null)

A search hit: a point with its similarity score.

Link copied to clipboard
@Serializable
data class ScrollPage(val points: List<Record>, val nextPageOffset: PointId? = null)

One page of scroll results plus the cursor to the next page.

Link copied to clipboard
@Serializable
data class ScrollRequest(val filter: Filter? = null, val limit: Int, val offset: PointId? = null, val withPayload: WithPayload? = null, val withVector: Boolean? = null, val orderBy: OrderBy? = null, val shardKey: ShardKey? = null)

Request body for a single POST /collections/{name}/points/scroll page.

Link copied to clipboard
@Serializable
data class SearchGroupsRequest(val groupBy: String, val groupSize: Int? = null, val limit: Int? = null, val prefetch: List<Prefetch>? = null, val query: QueryInterface? = null, val using: String? = null, val filter: Filter? = null, val params: SearchParams? = null, val scoreThreshold: Double? = null, val withPayload: WithPayload? = null, val withVector: Boolean? = null, val lookupFrom: LookupLocation? = null)

Request body for POST /collections/{name}/points/query/groups.

Link copied to clipboard
@Serializable
data class SearchMatrixOffsets(val offsetsRow: List<Long>, val offsetsCol: List<Long>, val scores: List<Float>, val ids: List<PointId>)

Distance matrix in sparse coordinate (COO) form: scores[i] is the score between the points at ids[offsetsRow[i]] and ids[offsetsCol[i]]. Compact for feeding clustering / dimensionality reduction.

Link copied to clipboard
@Serializable
data class SearchMatrixPair(val a: PointId, val b: PointId, val score: Float)

A single edge of the distance matrix: point a to point b with their similarity score.

Link copied to clipboard
@Serializable
data class SearchMatrixPairs(val pairs: List<SearchMatrixPair>)

Distance matrix in pairs form: an explicit list of scored point pairs.

Link copied to clipboard
@Serializable
data class SearchMatrixRequest(val filter: Filter? = null, val sample: Int? = null, val limit: Int? = null, val using: String? = null)

Request body for the distance-matrix analytics endpoints. Qdrant samples sample points and, for each, finds its limit nearest neighbours among the sample, optionally restricted by filter and computed on the using named vector.

Link copied to clipboard
@Serializable
data class SearchParams(val hnswEf: Int? = null, val exact: Boolean? = null, val indexedOnly: Boolean? = null)

Fine-tuning for a search's accuracy/speed trade-off.

Link copied to clipboard
@Serializable
data class SearchRequest(val prefetch: List<Prefetch>? = null, val query: QueryInterface? = null, val using: String? = null, val filter: Filter? = null, val limit: Int? = null, val offset: Int? = null, val withPayload: WithPayload? = null, val withVector: Boolean? = null, val scoreThreshold: Double? = null, val params: SearchParams? = null, val lookupFrom: LookupLocation? = null, val shardKey: ShardKey? = null)

Request body for POST /collections/{name}/points/query.

Link copied to clipboard
@Serializable(with = ShardKeySerializer::class)
sealed interface ShardKey

A user-defined sharding key: either a name or a number, the two forms Qdrant accepts.

Link copied to clipboard
@Serializable
data class ShardTransferInfo(val shardId: Int, val toShardId: Int? = null, val from: Long, val to: Long, val sync: Boolean = false)

A shard transfer in progress. sync distinguishes replicating a shard from moving it.

Link copied to clipboard
@Serializable
data class SnapshotDescription(val name: String, val creationTime: String? = null, val size: Long, val checksum: String? = null)

Metadata for one snapshot, returned by the create and list operations.

Link copied to clipboard
@Serializable
enum SnapshotPriority : Enum<SnapshotPriority>

Source-of-truth policy when recovering a snapshot into a collection that has replicas. Ignored for a single-replica collection.

Link copied to clipboard
@Serializable
data class SparseVectorParams(val modifier: Modifier? = null)

Config for a named sparse vector under CreateCollectionRequest.sparseVectors.

Link copied to clipboard
@Serializable
data class StrictModeConfig(val enabled: Boolean? = null, val maxQueryLimit: Int? = null, val maxTimeout: Int? = null, val unindexedFilteringRetrieve: Boolean? = null, val unindexedFilteringUpdate: Boolean? = null, val searchMaxHnswEf: Int? = null, val searchAllowExact: Boolean? = null, val upsertMaxBatchSize: Int? = null, val searchMaxBatchSize: Int? = null, val readRateLimit: Int? = null, val writeRateLimit: Int? = null, val maxPointsCount: Long? = null, val filterMaxConditions: Int? = null, val maxDiskUsagePercent: Int? = null, val maxResidentMemoryPercent: Int? = null)

Per-collection limits Qdrant enforces on the requests it accepts.

Link copied to clipboard
@Serializable
enum Tokenizer : Enum<Tokenizer>

How a text index splits a value into the tokens a matchText filter is matched against.

Link copied to clipboard
@Serializable
data class UpdateCollectionRequest(val optimizersConfig: OptimizersConfig? = null, val hnswConfig: HnswConfig? = null, val quantizationConfig: QuantizationConfig? = null, val strictModeConfig: StrictModeConfig? = null)

Request body for PATCH /collections/{name} — tune an existing collection's config.

Link copied to clipboard
@Serializable(with = VectorDataSerializer::class)
sealed interface VectorData

The vector(s) attached to a point, in any shape Qdrant accepts or returns:

Link copied to clipboard
@Serializable
enum VectorDatatype : Enum<VectorDatatype>

Storage datatype for vector elements. Defaults to FLOAT32 server-side when omitted.

Link copied to clipboard
sealed interface VectorInput : QueryInterface

A bare vector input — usable directly as a nearest-search QueryInterface and as a positive/negative example inside QueryInterface.Recommend, QueryInterface.Discover and ContextPair. One of a dense QueryInterface.Vector, a stored-point QueryInterface.ById, a QueryInterface.Sparse, a QueryInterface.MultiVector, or a QueryInterface.Inference the server embeds.

Link copied to clipboard
@Serializable
data class VectorParams(val size: Long, val distance: Distance, val onDisk: Boolean? = null, val datatype: VectorDatatype? = null, val hnswConfig: HnswConfig? = null, val multivectorConfig: MultiVectorConfig? = null)

Configuration for a single (dense) vector: dimensionality, metric, and storage options.

Link copied to clipboard
@Serializable(with = VectorsConfigSerializer::class)
sealed interface VectorsConfig

The vectors config of a collection, which Qdrant represents in two shapes:

Link copied to clipboard
@Serializable(with = WithPayloadSerializer::class)
sealed interface WithPayload

Payload projection for search/scroll results. Qdrant accepts four wire shapes: