enhance: Print out range_filter and radius when range search param check fail (#30623)

Signed-off-by: Yudong Cai <yudong.cai@zilliz.com>
This commit is contained in:
Cai Yudong 2024-02-18 15:40:48 +08:00 committed by GitHub
parent 941dc755df
commit 5bb28a9ea4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -120,11 +120,16 @@ CheckRangeSearchParam(float radius,
*/
if (PositivelyRelated(metric_type)) {
AssertInfo(range_filter > radius,
"range_filter must be greater than radius for IP/COSINE");
"range_filter({}) must be greater than radius({}) for "
"IP/COSINE",
range_filter,
radius);
} else {
AssertInfo(range_filter < radius,
"range_filter must be less than radius for "
"L2/HAMMING/JACCARD");
"range_filter({}) must be less than radius({}) for "
"L2/HAMMING/JACCARD",
range_filter,
radius);
}
}