Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

Commit

Permalink
Set DiskAnn Filter Threshold to Default Value when Missing (#897)
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Weizhi Xu <[email protected]>
  • Loading branch information
PwzXxm authored May 22, 2023
1 parent 5d260cb commit df91db9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions knowhere/index/vector_index/IndexDiskANNConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,12 @@ from_json(const Config& config, DiskANNQueryConfig& query_conf) {
std::max(kSearchListSizeMaxValue, static_cast<uint32_t>(10 * query_conf.k)),
query_conf.search_list_size);
CheckNumericParamAndSet<uint32_t>(config, kBeamwidth, kBeamwidthMinValue, kBeamwidthMaxValue, query_conf.beamwidth);
CheckNumericParamAndSet<float>(config, kFilterThreshold, kFilterThresholdMinValue, kFilterThresholdMaxValue,
query_conf.filter_threshold);
if (config.contains(kFilterThreshold)) {
CheckNumericParamAndSet<float>(config, kFilterThreshold, kFilterThresholdMinValue, kFilterThresholdMaxValue,
query_conf.filter_threshold);
} else {
query_conf.filter_threshold = kFilterThresholdMinValue;
}
}

void
Expand Down

0 comments on commit df91db9

Please sign in to comment.