These settings are available in system.settings and are autogenerated from source.
vector_search_filter_strategy
If a vector search query has a WHERE clause, this setting determines if it is evaluated first (pre-filtering) OR if the vector similarity index is checked first (post-filtering). Possible values:
- ‘auto’ - Postfiltering (the exact semantics may change in future).
- ‘postfilter’ - Use vector similarity index to identify the nearest neighbours, then apply other filters
- ‘prefilter’ - Evaluate other filters first, then perform brute-force search to identify neighbours.
vector_search_index_fetch_multiplier
Aliases: vector_search_postfilter_multiplier
Multiply the number of fetched nearest neighbors from the vector similarity index by this number. Only applied for post-filtering with other predicates or if setting ‘vector_search_with_rescoring = 1’. Valid range: [1.0, 1000.0]. Values outside this range are rejected.
vector_search_use_quantized_codes
Enables a two-stage approximate vector search without index (brute force scan) over a Quantized-compressed column. When enabled, ORDER BY L2Distance|cosineDistance(vec, reference) LIMIT k against a column encoded with a Quantized(...) codec will
- scan and filter the quantized vectors (this step produces
k * vector_search_index_fetch_multiplier results), and
- rescore the found vectors against original, full-precision vectors.
vector_search_with_rescoring
If ClickHouse performs rescoring for queries that use the vector similarity index.
Without rescoring, the vector similarity index returns the rows containing the best matches directly.
With rescoring, the vector similarity index fetches candidate rows and ClickHouse computes the exact distance
for these rows from the original full-precision vectors in the regular SQL pipeline.
When possible, ClickHouse filters the scan to candidate rows before the final distance computation.
Increase vector_search_index_fetch_multiplier if more candidate rows are needed for better recall, especially
with additional filters or quantized vector indexes.
Note: A query run without rescoring and with parallel replicas enabled may fall back to rescoring. Last modified on July 23, 2026