Fallback Parameters
Search parameters are typically configured via GUCs. VectorChord also offers an alternative method, allowing these parameters to be attached directly to an index instead of a session or transaction. In other words, you can store them as part of the index’s storage parameters.
You could set probes at index building using the following syntax.
You can now perform searches without setting GUCs:
If the index is already built, you can set probes like this:
You can still set GUCs for search parameters. When you do so, the GUCs take precedence over the index storage parameters. This allows you to temporarily override these settings for the current session or transaction without locking the index.
This syntax is useful in the following situations:
- When there are multiple indexes.
- When you prefer not to set GUCs.
- When you want to configure search parameters offline.
As long as GUCs are set, even at the system level or database level, they will override the index settings. So, to avoid hard-to-detect issues, we recommend using only one method to set search parameters, either via GUCs or via index storage parameters.
Not all parameters support this feature. See Reference for all supported parameters.
Reference
Index Storage Parameters (vchordrq)
vchordrq
probes
since v1.1.0
- Description: Fallback value of
vchordrq.probes. - Type: list of integers
- Default:
epsilon
since v1.1.0
- Description: Fallback value of
vchordrq.epsilon. - Type: real
- Default:
1.9 - Domain:
[0.0, 4.0]
maxsim_refine
since v1.1.0
- Description: Fallback value of
vchordrq.maxsim_refine. - Type: integer
- Default:
0 - Domain:
[0, 2147483647]
maxsim_threshold
since v1.1.0
- Description: Fallback value of
vchordrq.maxsim_threshold. - Type: integer
- Default:
0 - Domain:
[0, 2147483647]
Index Storage Parameters (vchordg)
vchordg
ef_search
since v1.1.0
- Description: Fallback value of
vchordg.ef_search. - Type: integer
- Default:
64 - Domain:
[1, 65535]