SearchAdditionalParams
API Definition
void ScannInterface::SearchAdditionalParams(float adp_threshold, float refine_prm, int adp_refined, int leaves_to_search);
Function
Extends ScaNN functionality with custom search parameters (KScaNN-specific API). The API parameter settings can be cached and apply to the subsequent search; therefore, set this API after index build and before search.
Parameters
Parameter |
Data Type |
Description |
Value Range |
|---|---|---|---|
adp_threshold |
float |
Decision threshold. The typical value is 0.3. |
[0.1, 0.8] |
refine_prm |
float |
Fine-grained control over the filtering strategy. The typical value is 0.2. |
[0.0, 1.0]. The default value is 0.0. A larger value reduces the number of subspaces to be filtered, which increases accuracy but degrades performance. |
adp_refined |
int |
Number of subspaces used by a simple query. The typical value is 0, which is an adaptive training value (the third quantile). |
[0, leaves_to_search], where leaves_to_search indicates the number of subspaces used by the complex query. |
leaves_to_search |
int |
Number of subspaces used by a complex query. The value must be consistent with that of the Search* API. |
[1, num_leaves], where num_leaves indicates the total number of subspaces in the IVF index partition. |