Configure quantized clustering (QC) index behavior through two parameter groups: QcBuilder controls how the index is built, and QcSearcher controls how queries are executed at runtime.
QcBuilder parameters are set at index-build time and cannot be changed without rebuilding the index.
QcSearcher parameters can be adjusted at any time without rebuilding the index.
QcBuilder
QcBuilder parameters control the offline index-building process, including training data volume, parallelism, cluster structure, and quantization.
| Parameter | Type | Default | Description |
|---|---|---|---|
qc.builder.train_sample_count | uint32 | 0 | Number of documents used as training data. Set to 0 to use all documents as training data. |
qc.builder.thread_count | uint32 | 0 | Number of threads used during index building. Set to 0 to use all available CPU cores on the OpenSearch Vector Search Edition instance. |
qc.builder.centroid_count | string | Optional | Number of centroids for clustering. Leave blank to let the system infer an appropriate count automatically—recommended for most cases. To configure manually, use a plain integer for a single-level cluster (for example, 1000) or separate levels with an asterisk (*) for hierarchical clusters (for example, 100*100). For hierarchical clusters, set a higher centroid count at the first level than at subsequent levels: the first level contributes 10 times as many data points to training as each subsequent level, so more centroids at the first level yields better results. |
qc.builder.quantizer_class | string | None | Quantizer used to compress index data. Omit this parameter to skip quantization. Valid values: Int8QuantizerConverter, HalfFloatConverter, DoubleBitConverter. A quantizer typically reduces index size and improves query speed, but may reduce retrieval accuracy. If your use case requires high recall, evaluate retrieval quality before using this parameter in production. |
qc.builder.quantize_by_centroid | bool | false | Specifies whether to perform quantization based on centroids. Takes effect only when qc.builder.quantizer_class is set to Int8QuantizerConverter. |
QcSearcher
QcSearcher parameters control query-time behavior and can be updated without rebuilding the index.
| Parameter | Type | Default | Description |
|---|---|---|---|
qc.searcher.scan_ratio | float | 0.01 | Fraction of all documents scanned during a query. Determines max_scan_num using the formula: max_scan_num = total documents × scan_ratio. |
qc.searcher.brute_force_threshold | int | 1000 | Document count below which the index falls back to brute force search instead of approximate nearest-neighbor search. |