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. Superseded by payload.memory.
payloadPayloadStorageSpecPayload storage configuration (Qdrant 1.19+).
id_trackerIdTrackerSpecMemory placement of the point ID mapping (Qdrant 1.20+).

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. Superseded by memory.
memoryMemoryMemory placement of the vector storage (Qdrant 1.19+). pinned is not supported for dense vectors. Ignored at create_vector time — apply via update_collection.
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. Superseded by memory.
full_scan_thresholduintPostings-list size below which Qdrant performs a full scan instead of using the index.
memoryMemoryMemory placement of the inverted index (Qdrant 1.19+).

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. Superseded by memory.
memoryMemoryMove the vector storage between memory tiers (Qdrant 1.19+).
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. Superseded by memory.
payload_muintm value for the dedicated payload-filtered graph.
memoryMemoryMemory placement of the HNSW graph (Qdrant 1.19+).

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
    memory: pinned      # or the older `always_ram: true`

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

# binary
quantization_config:
  binary:
    always_ram: true

# turboquant
quantization_config:
  turboquant:
    bits: "1.5"
    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. Superseded by memory.
memoryMemoryMemory placement of the quantized vectors (Qdrant 1.19+).

ProductQuantizationSpec

FieldTypeDescription
compressionstringCompression ratio — one of x4, x8, x16, x32, x64.
always_ramboolKeep quantized vectors in RAM. Superseded by memory.
memoryMemoryMemory placement of the quantized vectors (Qdrant 1.19+).

BinaryQuantizationSpec

FieldTypeDescription
always_ramboolKeep quantized vectors in RAM. Superseded by memory.
memoryMemoryMemory placement of the quantized vectors (Qdrant 1.19+).

TurboquantQuantizationSpec

TurboQuant is Qdrant's fast, data-oblivious quantization (Qdrant 1.18+). It encodes each component down to a handful of bits without a training pass.

FieldTypeDescription
bitsstringBits per component — one of 1, 1.5, 2, 4, 8 (8 requires Qdrant 1.20+). Omitted → server default.
always_ramboolKeep quantized vectors in RAM. Superseded by memory.
memoryMemoryMemory placement of the quantized vectors (Qdrant 1.19+).

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 · turbo4 · turbo8 · turbo16

turbo4 stores the primary vectors with TurboQuant 4-bit encoding and requires Qdrant 1.18.2+. turbo8 and turbo16 require Qdrant 1.20+ and store primary vectors at 8 or 16 bits per dimension. Datatypes are selected when creating a collection or adding a vector; changing them requires a new vector.

Memory

cold · cached · pinned — where a component's data is held in RAM (Qdrant 1.19+).

ValueMeaning
coldNot pre-loaded; cached lazily as it is used.
cachedPre-loaded into the disk cache on start, evictable under memory pressure.
pinnedHeld in RAM and never evicted.

Data is always persisted on disk regardless of this setting — memory only controls caching. It supersedes the older on_disk / always_ram / on_disk_payload booleans, which Qdrant still accepts; when both are set on a component, memory wins. revector sends whichever one a migration declared, so a file written against Qdrant 1.18 keeps its exact meaning.

Qdrant rejects pinned for dense vector storage and for the payload store.

memory needs a Qdrant 1.19 server. Declaring it against an older one would be a silent no-op — gRPC drops fields a server predates rather than rejecting them — so up and down check the live server version first and refuse the run, naming the field and revision. The same guard covers the collection payload: block, params.prefix, params.stemmer: disabled, and datatype: turbo4 (which needs 1.18.2). Qdrant 1.20 settings — id_tracker, turbo8, turbo16, TurboQuant bits: "8", index nested / scoring, and tokenizer: code — are guarded at 1.20.0.

PayloadStorageSpec

Payload storage configuration (Qdrant 1.19+) — the successor to on_disk_payload.

FieldTypeDescription
memoryMemoryMemory placement of the payload store. pinned is not supported.
payload:
  memory: cold

IdTrackerSpec

Memory placement of the point ID mapping in indexed segments (Qdrant 1.20+). Accepted on create_collection.spec and update_collection; diff compares placement only when it is declared.

FieldTypeDescription
memoryMemorypinned (default), cached, or cold.
id_tracker:
  memory: cold

TextScoringSpec

Enable BM25 ranking on a full-text payload index (Qdrant 1.20+):

scoring: { type: bm25 }

BM25 statistics are derived from indexed payload text. Applications select the payload field through using in a Qdrant text query; query-time k and b parameters belong to the application, not the index migration.

PayloadSchemaType

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

PayloadIndexParamsSpec

Tuning knobs for a payload index, set via create_payload_index.params. Qdrant models these as a per-field-type union; since the field type is already named by schema:, revector keeps the YAML flat and validates applicability instead — setting a field the chosen type doesn't accept fails revector validate offline rather than being silently dropped.

FieldTypeApplies toDescription
nestedstringallArray path whose elements are indexed separately, e.g. offers for offers[].price (Qdrant 1.20+).
scoringTextScoringSpectextEnable BM25 ranking (Qdrant 1.20+).
on_diskboolallStore the index on disk. Superseded by memory.
memoryMemoryallMemory placement of the index (Qdrant 1.19+).
enable_hnswboolallBuild payload-aware HNSW links for this field (needs payload_m > 0).
is_tenantboolkeyword, uuidOptimize storage for multitenancy on this field.
is_principalboolinteger, float, datetimeOrganize collection storage by this field.
prefixboolkeywordEnable match: { prefix: … } filtering (Qdrant 1.19+).
lookupboolintegerSupport direct lookups.
rangeboolintegerSupport range filters.
tokenizerprefix·whitespace·word·multilingual·codetextTokenizer. Required when a text index declares params; code requires Qdrant 1.20+.
lowercasebooltextLowercase all tokens.
min_token_len / max_token_lenuinttextToken length bounds.
phrase_matchingbooltextSupport phrase matching.
ascii_foldingbooltextFold accented characters to ASCII.
stopwordsStopwordsSpectextStopwords to drop when tokenizing.
stemmerStemmerSpectextStemming algorithm.

The code tokenizer splits identifiers at underscores and case changes, while also indexing the full identifier. getUserName can match user name or get_user_name.

With nested, the indexed field must be inside the named array. For text, each element becomes its own document for all queries and BM25 scoring. For all types, an is_empty condition on the field matches a point when an element lacks that field, and never a point without elements.

StopwordsSpec

FieldTypeDescription
languageslistBuilt-in stopword lists to apply, by language name.
customlistExtra stopwords on top of the built-in lists.

StemmerSpec

stemmer: { snowball: english }   # Snowball stemmer for a language
stemmer: disabled                # opt out of the language default (Qdrant 1.19+)