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
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)

Summary of a collection returned by getCollection.

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)

Request body for PUT /collections/{name}.

Link copied to clipboard
sealed interface DeleteSelector

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

Link copied to clipboard

Sort direction for QueryInterface.OrderBy.

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

Vector distance metric. Wire values match Qdrant exactly.

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
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
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
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

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
@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)

A point returned by scroll (no similarity score).

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)

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)

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

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 UpdateCollectionRequest(val optimizersConfig: OptimizersConfig? = null, val hnswConfig: HnswConfig? = null, val quantizationConfig: QuantizationConfig? = 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, or a QueryInterface.MultiVector.

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: