> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# vector_search_* session settings

> ClickHouse session settings in the vector_search_* generated group.

These settings are available in [system.settings](https://clickhouse.com/docs/reference/system-tables/settings.md) and are autogenerated from [source](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp).

## vector\_search\_filter\_strategy

Type

VectorSearchFilterStrategy

Default

auto

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`

Type

Float

Default

1

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

Type

Bool

Default

0

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

1. scan and filter the quantized vectors (this step produces `k * vector_search_index_fetch_multiplier` results), and
2. rescore the found vectors against original, full-precision vectors.

## vector\_search\_with\_rescoring

Type

Bool

Default

0

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.
