@@ -2,13 +2,20 @@ syntax = "proto3";
22package qdrant ;
33
44
5+ import "json_with_int.proto" ;
6+ import "common.proto" ;
7+
58enum Datatype {
69 Default = 0 ;
710 Float32 = 1 ;
811 Uint8 = 2 ;
912 Float16 = 3 ;
1013}
1114
15+ // ---------------------------------------------
16+ // ------------- Collection Config -------------
17+ // ---------------------------------------------
18+
1219message VectorParams {
1320 uint64 size = 1 ; // Size of the vectors
1421 Distance distance = 2 ; // Distance function used for comparing vectors
@@ -159,6 +166,10 @@ message OptimizerStatus {
159166 string error = 2 ;
160167}
161168
169+ message CollectionWarning {
170+ string message = 1 ;
171+ }
172+
162173message HnswConfigDiff {
163174 /*
164175 Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.
@@ -169,10 +180,12 @@ message HnswConfigDiff {
169180 */
170181 optional uint64 ef_construct = 2 ;
171182 /*
172- Minimal size (in KiloBytes) of vectors for additional payload-based indexing.
173- If the payload chunk is smaller than `full_scan_threshold` additional indexing won't be used -
174- in this case full-scan search should be preferred by query planner and additional indexing is not required.
175- Note: 1 Kb = 1 vector of size 256
183+ Minimal size threshold (in KiloBytes) below which full-scan is preferred over HNSW search.
184+ This measures the total size of vectors being queried against.
185+ When the maximum estimated amount of points that a condition satisfies is smaller than
186+ `full_scan_threshold`, the query planner will use full-scan search instead of HNSW index
187+ traversal for better performance.
188+ Note: 1Kb = 1 vector of size 256
176189 */
177190 optional uint64 full_scan_threshold = 3 ;
178191 /*
@@ -190,6 +203,13 @@ message HnswConfigDiff {
190203 Number of additional payload-aware links per node in the index graph. If not set - regular M parameter will be used.
191204 */
192205 optional uint64 payload_m = 6 ;
206+ /*
207+ Store copies of original and quantized vectors within the HNSW index file. Default: false.
208+ Enabling this option will trade the search speed for disk usage by reducing amount of
209+ random seeks during the search.
210+ Requires quantized vectors to be enabled. Multi-vectors are not supported.
211+ */
212+ optional bool inline_storage = 7 ;
193213}
194214
195215message SparseIndexConfig {
@@ -211,6 +231,7 @@ message SparseIndexConfig {
211231message WalConfigDiff {
212232 optional uint64 wal_capacity_mb = 1 ; // Size of a single WAL block file
213233 optional uint64 wal_segments_ahead = 2 ; // Number of segments to create in advance
234+ optional uint64 wal_retain_closed = 3 ; // Number of closed segments to retain
214235}
215236
216237message OptimizersConfigDiff {
@@ -349,41 +370,41 @@ enum ShardingMethod {
349370}
350371
351372message StrictModeConfig {
352- optional bool enabled = 1 ;
353- optional uint32 max_query_limit = 2 ;
354- optional uint32 max_timeout = 3 ;
355- optional bool unindexed_filtering_retrieve = 4 ;
356- optional bool unindexed_filtering_update = 5 ;
357-
358- optional uint32 search_max_hnsw_ef = 6 ;
359- optional bool search_allow_exact = 7 ;
360- optional float search_max_oversampling = 8 ;
361- optional uint64 upsert_max_batchsize = 9 ;
362- optional uint64 max_collection_vector_size_bytes = 10 ;
373+ optional bool enabled = 1 ; // Whether strict mode is enabled for a collection or not.
374+ optional uint32 max_query_limit = 2 ; // Max allowed `limit` parameter for all APIs that don't have their own max limit.
375+ optional uint32 max_timeout = 3 ; // Max allowed `timeout` parameter.
376+ optional bool unindexed_filtering_retrieve = 4 ; // Allow usage of unindexed fields in retrieval based (e.g. search) filters.
377+ optional bool unindexed_filtering_update = 5 ; // Allow usage of unindexed fields in filtered updates (e.g. delete by payload).
378+ optional uint32 search_max_hnsw_ef = 6 ; // Max HNSW ef value allowed in search parameters.
379+ optional bool search_allow_exact = 7 ; // Whether exact search is allowed.
380+ optional float search_max_oversampling = 8 ; // Max oversampling value allowed in search
381+ optional uint64 upsert_max_batchsize = 9 ; // Max batchsize when upserting
382+ optional uint64 max_collection_vector_size_bytes = 10 ; // Max size of a collections vector storage in bytes, ignoring replicas.
363383 optional uint32 read_rate_limit = 11 ; // Max number of read operations per minute per replica
364384 optional uint32 write_rate_limit = 12 ; // Max number of write operations per minute per replica
365- optional uint64 max_collection_payload_size_bytes = 13 ;
366- optional uint64 filter_max_conditions = 14 ;
367- optional uint64 condition_max_size = 15 ;
368- optional StrictModeMultivectorConfig multivector_config = 16 ;
369- optional StrictModeSparseConfig sparse_config = 17 ;
370- optional uint64 max_points_count = 18 ;
385+ optional uint64 max_collection_payload_size_bytes = 13 ; // Max size of a collections payload storage in bytes, ignoring replicas.
386+ optional uint64 filter_max_conditions = 14 ; // Max conditions a filter can have.
387+ optional uint64 condition_max_size = 15 ; // Max size of a condition, eg. items in `MatchAny`.
388+ optional StrictModeMultivectorConfig multivector_config = 16 ; // Multivector strict mode configuration
389+ optional StrictModeSparseConfig sparse_config = 17 ; // Sparse vector strict mode configuration
390+ optional uint64 max_points_count = 18 ; // Max number of points estimated in a collection
391+ optional uint64 max_payload_index_count = 19 ; // Max number of payload indexes in a collection
371392}
372393
373394message StrictModeSparseConfig {
374395 map <string , StrictModeSparse > sparse_config = 1 ;
375396}
376397
377398message StrictModeSparse {
378- optional uint64 max_length = 10 ;
399+ optional uint64 max_length = 10 ; // Max length of sparse vector
379400}
380401
381402message StrictModeMultivectorConfig {
382403 map <string , StrictModeMultivector > multivector_config = 1 ;
383404}
384405
385406message StrictModeMultivector {
386- optional uint64 max_vectors = 1 ;
407+ optional uint64 max_vectors = 1 ; // Max number of vectors in a multivector
387408}
388409
389410message CreateCollection {
@@ -399,11 +420,12 @@ message CreateCollection {
399420 optional VectorsConfig vectors_config = 10 ; // Configuration for vectors
400421 optional uint32 replication_factor = 11 ; // Number of replicas of each shard that network tries to maintain, default = 1
401422 optional uint32 write_consistency_factor = 12 ; // How many replicas should apply the operation for us to consider it successful, default = 1
402- optional string init_from_collection = 13 ; // Deprecated: specify name of the other collection to copy data from
423+ reserved 13 ; // Deprecated: init_from
403424 optional QuantizationConfig quantization_config = 14 ; // Quantization configuration of vector
404425 optional ShardingMethod sharding_method = 15 ; // Sharding method
405426 optional SparseVectorConfig sparse_vectors_config = 16 ; // Configuration for sparse vectors
406427 optional StrictModeConfig strict_mode_config = 17 ; // Configuration for strict mode
428+ map <string , Value > metadata = 18 ; // Arbitrary JSON metadata for the collection
407429}
408430
409431message UpdateCollection {
@@ -416,6 +438,7 @@ message UpdateCollection {
416438 optional QuantizationConfigDiff quantization_config = 7 ; // Quantization configuration of vector
417439 optional SparseVectorConfig sparse_vectors_config = 8 ; // New sparse vector parameters
418440 optional StrictModeConfig strict_mode_config = 9 ; // New strict mode configuration
441+ map <string , Value > metadata = 10 ; // Arbitrary JSON-like metadata for the collection, will be merged with already stored metadata
419442}
420443
421444message DeleteCollection {
@@ -455,6 +478,7 @@ message CollectionConfig {
455478 WalConfigDiff wal_config = 4 ; // Configuration of the Write-Ahead-Log
456479 optional QuantizationConfig quantization_config = 5 ; // Configuration of the vector quantization
457480 optional StrictModeConfig strict_mode_config = 6 ; // Configuration of strict mode.
481+ map <string , Value > metadata = 7 ; // Arbitrary JSON metadata for the collection
458482}
459483
460484enum TokenizerType {
@@ -500,6 +524,7 @@ message TextIndexParams {
500524 optional StopwordsSet stopwords = 6 ; // Stopwords for the text index
501525 optional bool phrase_matching = 7 ; // If true - support phrase matching.
502526 optional StemmingAlgorithm stemmer = 8 ; // Set an algorithm for stemming.
527+ optional bool ascii_folding = 9 ; // If true, normalize tokens by folding accented characters to ASCII (e.g., "ação" -> "acao"). Default: false.
503528}
504529
505530message StemmingAlgorithm {
@@ -548,14 +573,15 @@ message PayloadSchemaInfo {
548573message CollectionInfo {
549574 CollectionStatus status = 1 ; // operating condition of the collection
550575 OptimizerStatus optimizer_status = 2 ; // status of collection optimizers
551- optional uint64 vectors_count = 3 ; // Approximate number of vectors in the collection
576+ reserved 3 ; // Deprecated
552577 uint64 segments_count = 4 ; // Number of independent segments
553578 reserved 5 ; // Deprecated
554579 reserved 6 ; // Deprecated
555580 CollectionConfig config = 7 ; // Configuration
556581 map <string , PayloadSchemaInfo > payload_schema = 8 ; // Collection data types
557582 optional uint64 points_count = 9 ; // Approximate number of points in the collection
558583 optional uint64 indexed_vectors_count = 10 ; // Approximate number of indexed vectors in the collection.
584+ repeated CollectionWarning warnings = 11 ; // Warnings related to the collection
559585}
560586
561587message ChangeAliases {
@@ -615,6 +641,7 @@ enum ReplicaState {
615641 Recovery = 6 ; // Shard is undergoing recovered by an external node; Normally rejects updates, accepts updates if force is true
616642 Resharding = 7 ; // Points are being migrated to this shard as part of scale-up resharding
617643 ReshardingScaleDown = 8 ; // Points are being migrated to this shard as part of scale-down resharding
644+ ActiveRead = 9 ; // Active for readers, Partial for writers
618645}
619646
620647message ShardKey {
@@ -701,6 +728,12 @@ message RestartTransfer {
701728 ShardTransferMethod method = 4 ;
702729}
703730
731+ message ReplicatePoints {
732+ ShardKey from_shard_key = 1 ; // Source shard key
733+ ShardKey to_shard_key = 2 ; // Target shard key
734+ optional Filter filter = 3 ; // If set - only points matching the filter will be replicated
735+ }
736+
704737enum ShardTransferMethod {
705738 StreamRecords = 0 ; // Stream shard records in batches
706739 Snapshot = 1 ; // Snapshot the shard and recover it on the target peer
@@ -718,6 +751,7 @@ message CreateShardKey {
718751 optional uint32 shards_number = 2 ; // Number of shards to create per shard key
719752 optional uint32 replication_factor = 3 ; // Number of replicas of each shard to create
720753 repeated uint64 placement = 4 ; // List of peer ids, allowed to create shards. If empty - all peers are allowed
754+ optional ReplicaState initial_state = 5 ; // Initial state of created replicas. Warning: use with care.
721755}
722756
723757message DeleteShardKey {
@@ -734,6 +768,7 @@ message UpdateCollectionClusterSetupRequest {
734768 CreateShardKey create_shard_key = 7 ;
735769 DeleteShardKey delete_shard_key = 8 ;
736770 RestartTransfer restart_transfer = 9 ;
771+ ReplicatePoints replicate_points = 10 ;
737772 }
738773 optional uint64 timeout = 6 ; // Wait timeout for operation commit in seconds, if not specified - default value will be supplied
739774}
0 commit comments