Specs

The shapes referenced by operations. These types are the on-disk vocabulary — they are deliberately decoupled from qdrant-client, so a client-crate upgrade can't silently change the meaning of a committed migration.

CollectionSpec

The full specification of a collection. Used by create_collection and as the desired state passed to revector diff.

FieldTypeDescription
vectorsmap<name, VectorSpec>Named dense vectors. Use "" as the key for the unnamed/default vector.
sparse_vectorsmap<name, SparseVectorSpec>Named sparse vectors.
hnsw_configHnswConfigSpecCollection-level HNSW defaults.
quantization_configQuantizationSpecCollection-level quantization defaults.
optimizers_configOptimizersConfigSpecOptimizer thresholds.
shard_numberuintNumber of shards (immutable after create on single-node).
replication_factoruintReplication factor.
write_consistency_factoruintWrite consistency factor.
on_disk_payloadboolStore the whole collection payload on disk.

VectorSpec

Configuration of a single (dense) named vector.

FieldTypeDescription
sizeuintDimensionality. Immutable once created.
distanceDistanceDistance metric. Immutable in place.
on_diskboolStore vectors on disk rather than in RAM.
hnsw_configHnswConfigSpecPer-vector HNSW overrides. Ignored at create_vector time — apply via update_collection.
quantization_configQuantizationSpecPer-vector quantization overrides. Ignored at create_vector time — apply via update_collection.
datatypeDatatypeElement storage type.

SparseVectorSpec

Configuration of a single named sparse vector.

FieldTypeDescription
on_diskboolStore the sparse index on disk.
full_scan_thresholduintPostings-list size below which Qdrant performs a full scan instead of using the index.

VectorParamsDiff

Used inside update_collection.vectors to patch the in-place tunables of an existing named vector. size and distance are deliberately excluded — they are immutable.

FieldTypeDescription
on_diskboolMove the vector on / off disk.
hnsw_configHnswConfigSpecPer-vector HNSW params.
quantization_configQuantizationSpecPer-vector quantization.

HnswConfigSpec

HNSW index parameters. Only fields you set are sent — unset means "leave alone".

FieldTypeDescription
muintNumber of edges per node in the index graph.
ef_constructuintSize of the dynamic candidate list during construction.
full_scan_thresholduintVector count below which Qdrant uses a full scan instead of the index.
max_indexing_threadsuintMaximum threads to use when building the index.
on_diskboolStore the HNSW graph on disk.
payload_muintm value for the dedicated payload-filtered graph.

QuantizationSpec

Tagged union — set exactly one variant. Use disabled inside update_collection to turn quantization off.

# scalar
quantization_config:
  scalar:
    type: int8
    quantile: 0.99
    always_ram: true

# product
quantization_config:
  product:
    compression: x8
    always_ram: true

# binary
quantization_config:
  binary:
    always_ram: true

# disable (update_collection only)
quantization_config: disabled

ScalarQuantizationSpec

FieldTypeDescription
typestringQuantization type. Only int8 exists today. Default: int8.
quantilefloatQuantile used to clip outliers when computing the scale.
always_ramboolKeep quantized vectors in RAM.

ProductQuantizationSpec

FieldTypeDescription
compressionstringCompression ratio — one of x4, x8, x16, x32, x64.
always_ramboolKeep quantized vectors in RAM.

BinaryQuantizationSpec

FieldTypeDescription
always_ramboolKeep quantized vectors in RAM.

OptimizersConfigSpec

Optimizer thresholds and behavior. All fields optional.

FieldTypeDescription
deleted_thresholdfloatFraction of deleted points that triggers segment vacuum.
vacuum_min_vector_numberuintMinimum vectors per segment before vacuum is considered.
default_segment_numberuintTarget number of segments.
max_segment_sizeuintMaximum segment size in KB.
memmap_thresholduintSegment size in KB above which Qdrant memory-maps it.
indexing_thresholduintVector count above which a segment becomes indexed.
flush_interval_secuintInterval (seconds) between automatic flushes.

Distance

Cosine · Euclid · Dot · Manhattan

Datatype

float32 · uint8 · float16

PayloadSchemaType

keyword · integer · float · geo · text · bool · datetime · uuid