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

Code before:
  // Note: 1Kb = 1 vector of size 256
  optional uint64 memmap_threshold = 5;
  // Maximum size (in kilobytes) of vectors allowed for plain index, exceeding
  // this threshold will enable vector indexing
  //
  // Default value is 20,000, based on
  // <https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md>.
  //
  // To disable vector indexing, set to `0`.
  //
  // Note: 1kB = 1 vector of size 256.
  optional uint64 indexing_threshold = 6;
  // Interval between forced flushes.
  optional uint64 flush_interval_sec = 7;

  // Deprecated in favor of `max_optimization_threads`
  optional uint64 deprecated_max_optimization_threads = 8;

  // Max number of threads (jobs) for running optimizations per shard.
  // Note: each optimization job will also use `max_indexing_threads` threads by itself for index building.
  // If "auto" - have no limit and choose dynamically to saturate CPU.
  // If 0 - no optimization threads, optimizations will be disabled.
  optional MaxOptimizationThreads max_optimization_threads = 9;

  // If this option is set, service will try to prevent creation of large unoptimized segments.
  // When enabled, updates may be delayed if there are unoptimized segments larger than indexing threshold.
  // Updates will be resumed when optimization is completed and segments are optimized below the threshold.
  // Using this option may lead to increased delay between submitting an update and its application.
  // Default is disabled.
  optional bool prevent_unoptimized = 10;
}

message ScalarQuantization {
  // Type of quantization
  QuantizationType type = 1;
  // Number of bits to use for quantization
  optional float quantile = 2;
  // If true - quantized vectors always will be stored in RAM, ignoring the config of main storage
  optional bool always_ram = 3;
}

message ProductQuantization {
  // Compression ratio
  CompressionRatio compression = 1;
  // If true - quantized vectors always will be stored in RAM, ignoring the config of main storage
  optional bool always_ram = 2;
}

enum BinaryQuantizationEncoding {
  OneBit = 0;
  TwoBits = 1;

Review comment (performance):
```suggestion
  // When enabled, updates may be blocked at request level if there are unoptimized segments larger than indexing threshold.
```

Code after:
  // Note: 1Kb = 1 vector of size 256
  optional uint64 memmap_threshold = 5;
  // Maximum size (in kilobytes) of vectors allowed for plain index, exceeding
  // this threshold will enable vector indexing
  //
  // Default value is 20,000, based on
  // <https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md>.
  //
  // To disable vector indexing, set to `0`.
  //
  // Note: 1kB = 1 vector of size 256.
  optional uint64 indexing_threshold = 6;
  // Interval between forced flushes.
  optional uint64 flush_interval_sec = 7;

  // Deprecated in favor of `max_optimization_threads`
  optional uint64 deprecated_max_optimization_threads = 8;

  // Max number of threads (jobs) for running optimizations per shard.
  // Note: each optimization job will also use `max_indexing_threads` threads by itself for index building.
  // If "auto" - have no limit and choose dynamically to saturate CPU.
  // If 0 - no optimization threads, optimizations will be disabled.
  optional MaxOptimizationThreads max_optimization_threads = 9;

  // If this option is set, service will try to prevent creation of large unoptimized segments.
  // When enabled, updates may be blocked at request level if there are unoptimized segments larger than indexing threshold.
  // Updates will be resumed when optimization is completed and segments are optimized below the threshold.
  // Using this option may lead to increased delay between submitting an update and its application.
  // Default is disabled.
  optional bool prevent_unoptimized = 10;
}

message ScalarQuantization {
  // Type of quantization
  QuantizationType type = 1;
  // Number of bits to use for quantization
  optional float quantile = 2;
  // If true - quantized vectors always will be stored in RAM, ignoring the config of main storage
  optional bool always_ram = 3;
}

message ProductQuantization {
  // Compression ratio
  CompressionRatio compression = 1;
  // If true - quantized vectors always will be stored in RAM, ignoring the config of main storage
  optional bool always_ram = 2;
}

enum BinaryQuantizationEncoding {
  OneBit = 0;
  TwoBits = 1;