VectorData

@Serializable(with = VectorDataSerializer::class)
sealed interface VectorData

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

  • Dense — one anonymous dense vector: [0.1, 0.2, ...].

  • Sparse — a sparse vector (always used under a name): {"indices":[...],"values":[...]}.

  • MultiDense — a multi-vector / late-interaction (ColBERT) vector: [[...],[...]].

  • Named — a map of vector-name to any of the above; dense, sparse and multi-vectors may be mixed.

  • Raw — a shape this version does not model, kept verbatim so decoding a response never fails.

Inheritors

Types

Link copied to clipboard
data class Dense(val values: List<Float>) : VectorData

One anonymous dense vector.

Link copied to clipboard
class DenseArray(val values: FloatArray) : VectorData

One anonymous dense vector backed by a FloatArray — a zero-boxing fast path for the hot path (values are never wrapped in Float objects, and serialization writes the array directly). Prefer this over Dense for large vectors. Equality is by content.

Link copied to clipboard
data class MultiDense(val vectors: List<List<Float>>) : VectorData

A multi-vector / late-interaction (ColBERT) vector: several equal-length dense vectors.

Link copied to clipboard
data class Named(val vectors: Map<String, VectorData>) : VectorData

Named vectors; each entry may be Dense, Sparse or MultiDense.

Link copied to clipboard
data class Raw(val json: JsonElement) : VectorData

A vector shape this version does not model, kept verbatim so response decoding degrades gracefully.

Link copied to clipboard
data class Sparse(val indices: List<Int>, val values: List<Float>) : VectorData

A sparse vector; indices must be unique and the same length as values. Used under a name.