Repository: qdrant/qdrant
File: lib/api/src/grpc/proto/collections.proto (Protocol Buffers)

Code before:
enum ShardingMethod {
  Auto = 0; // Auto-sharding based on record ids
  Custom = 1; // Shard by user-defined key
}

message StrictModeConfig {
  optional bool enabled = 1;
  optional uint32 max_query_limit = 2;
  optional uint32 max_timeout = 3;
  optional bool unindexed_filtering_retrieve = 4;
  optional bool unindexed_filtering_update = 5;

  optional uint32 search_max_hnsw_ef = 6;
  optional bool search_allow_exact = 7;
  optional float search_max_oversampling = 8;
  optional uint64 upsert_max_batchsize = 9;
  optional uint64 max_collection_vector_size_bytes = 10;
  optional uint32 read_rate_limit = 11; // Max number of read operations per minute per replica
  optional uint32 write_rate_limit = 12; // Max number of write operations per minute per replica
  optional uint64 max_collection_payload_size_bytes = 13;
  optional uint64 filter_max_conditions = 14;
  optional uint64 condition_max_size = 15;
  optional StrictModeMultivectorConfig multivector_config = 16;
  optional StrictModeSparseConfig sparse_config = 17;
  optional uint64 max_points_count = 18;
  optional uint64 max_payload_index_count = 19;
}

message StrictModeSparseConfig {
  map<string, StrictModeSparse> sparse_config = 1;
}

message StrictModeSparse {
  optional uint64 max_length = 10;
}

message StrictModeMultivectorConfig {
  map<string, StrictModeMultivector> multivector_config = 1;
}

message StrictModeMultivector {
  optional uint64 max_vectors = 1;
}

message CreateCollection {
  string collection_name = 1; // Name of the collection
  reserved 2; // Deprecated
  reserved 3; // Deprecated
  optional HnswConfigDiff hnsw_config = 4; // Configuration of vector index
  optional WalConfigDiff wal_config = 5; // Configuration of the Write-Ahead-Log
  optional OptimizersConfigDiff optimizers_config = 6; // Configuration of the optimizers

Review comment (suggestion):
```suggestion
  optional uint64 max_payload_index_count = 19; // Max number of payload index in a collection
```

Code after:
enum ShardingMethod {
  Auto = 0; // Auto-sharding based on record ids
  Custom = 1; // Shard by user-defined key
}

message StrictModeConfig {
  optional bool enabled = 1; // Whether strict mode is enabled for a collection or not.
  optional uint32 max_query_limit = 2; // Max allowed `limit` parameter for all APIs that don't have their own max limit.
  optional uint32 max_timeout = 3; // Max allowed `timeout` parameter.
  optional bool unindexed_filtering_retrieve = 4; // Allow usage of unindexed fields in retrieval based (e.g. search) filters.
  optional bool unindexed_filtering_update = 5; // Allow usage of unindexed fields in filtered updates (e.g. delete by payload).
  optional uint32 search_max_hnsw_ef = 6; // Max HNSW ef value allowed in search parameters.
  optional bool search_allow_exact = 7; // Whether exact search is allowed.
  optional float search_max_oversampling = 8; // Max oversampling value allowed in search
  optional uint64 upsert_max_batchsize = 9; // Max batchsize when upserting
  optional uint64 max_collection_vector_size_bytes = 10; // Max size of a collections vector storage in bytes, ignoring replicas.
  optional uint32 read_rate_limit = 11; // Max number of read operations per minute per replica
  optional uint32 write_rate_limit = 12; // Max number of write operations per minute per replica
  optional uint64 max_collection_payload_size_bytes = 13; // Max size of a collections payload storage in bytes, ignoring replicas.
  optional uint64 filter_max_conditions = 14; // Max conditions a filter can have.
  optional uint64 condition_max_size = 15; // Max size of a condition, eg. items in `MatchAny`.
  optional StrictModeMultivectorConfig multivector_config = 16; // Multivector strict mode configuration
  optional StrictModeSparseConfig sparse_config = 17; // Sparse vector strict mode configuration
  optional uint64 max_points_count = 18; // Max number of points estimated in a collection
  optional uint64 max_payload_index_count = 19; // Max number of payload indexes in a collection
}

message StrictModeSparseConfig {
  map<string, StrictModeSparse> sparse_config = 1;
}

message StrictModeSparse {
  optional uint64 max_length = 10;  // Max length of sparse vector
}

message StrictModeMultivectorConfig {
  map<string, StrictModeMultivector> multivector_config = 1;
}

message StrictModeMultivector {
  optional uint64 max_vectors = 1; // Max number of vectors in a multivector
}

message CreateCollection {
  string collection_name = 1; // Name of the collection
  reserved 2; // Deprecated
  reserved 3; // Deprecated
  optional HnswConfigDiff hnsw_config = 4; // Configuration of vector index
  optional WalConfigDiff wal_config = 5; // Configuration of the Write-Ahead-Log
  optional OptimizersConfigDiff optimizers_config = 6; // Configuration of the optimizers
  optional uint32 shard_number = 7; // Number of shards in the collection, default is 1 for standalone, otherwise equal to the number of nodes. Minimum is 1