Correct range search param check error msg (#25066)

Signed-off-by: Yudong Cai <yudong.cai@zilliz.com>
pull/25118/head
Cai Yudong 2023-06-25 15:34:44 +08:00 committed by GitHub
parent 9e787416be
commit 23492fed99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 10 deletions

View File

@ -120,17 +120,12 @@ CheckRangeSearchParam(float radius,
*
*/
if (PositivelyRelated(metric_type)) {
if (range_filter <= radius) {
PanicInfo(
"range_filter must be greater than or equal to radius for IP "
"and COSINE");
}
AssertInfo(range_filter > radius,
"range_filter must be greater than radius for IP/COSINE");
} else {
if (range_filter >= radius) {
PanicInfo(
"range_filter must be less than or equal to radius for "
"L2/HAMMING/JACCARD/TANIMOTO");
}
AssertInfo(range_filter < radius,
"range_filter must be less than radius for "
"L2/HAMMING/JACCARD/TANIMOTO");
}
}