From 3b38f7f1980e5875cd69b131ec1153a02265a031 Mon Sep 17 00:00:00 2001 From: op-hunter Date: Tue, 23 Jun 2020 23:41:04 +0800 Subject: [PATCH] #2649 Remove annoy search parameter validation (#2650) * remove annoy search parameter validation Signed-off-by: cmli * fix test failed Signed-off-by: cmli * fix lint error Signed-off-by: cmli * fix lint error again Signed-off-by: cmli Co-authored-by: cmli --- CHANGELOG.md | 1 + core/src/utils/ValidationUtil.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63611538ac..fcd5230e02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ Please mark all change in change log and use the issue from GitHub - \#2598 fix Milvus docker image report illegal instruction - \#2617 Fix HNSW and RNSG index files size - \#2637 Suit the range of HNSW parameters +- \#2649 search parameter of annoy has conflict with document ## Feature diff --git a/core/src/utils/ValidationUtil.cpp b/core/src/utils/ValidationUtil.cpp index e650e0e87b..d2b4b39624 100644 --- a/core/src/utils/ValidationUtil.cpp +++ b/core/src/utils/ValidationUtil.cpp @@ -316,8 +316,8 @@ ValidationUtil::ValidateSearchParams(const milvus::json& search_params, break; } case (int32_t)engine::EngineType::ANNOY: { - auto status = CheckParameterRange(search_params, knowhere::IndexParams::search_k, topk, - std::numeric_limits::max()); + auto status = CheckParameterRange(search_params, knowhere::IndexParams::search_k, + std::numeric_limits::min(), std::numeric_limits::max()); if (!status.ok()) { return status; }