Skip to content

Commit

Permalink
fix: Use latest error message for range_filter and radius check (#666)
Browse files Browse the repository at this point in the history
See also milvus-io/milvus#30623

---------

Signed-off-by: Congqi Xia <[email protected]>
  • Loading branch information
congqixia authored Feb 20, 2024
1 parent 903137b commit b1a1087
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/testcases/search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,7 @@ func TestRangeSearchScannL2(t *testing.T) {
sp.AddRangeFilter(20)
_, errRange := mc.Search(ctx, collName, []string{}, "", []string{"*"}, queryVec, common.DefaultFloatVecFieldName,
entity.L2, common.DefaultTopK, sp)
common.CheckErr(t, errRange, false, "range_filter must be less than radius for L2/HAMMING/JACCARD")
common.CheckErr(t, errRange, false, "range_filter(20) must be less than radius(15) for L2/HAMMING/JACCARD")
}

// test range search with scann index and IP COSINE metric type
Expand Down Expand Up @@ -1289,7 +1289,7 @@ func TestRangeSearchScannIPCosine(t *testing.T) {
sp.AddRangeFilter(10)
_, errRange := mc.Search(ctx, collName, []string{}, "", []string{"*"}, queryVec, common.DefaultFloatVecFieldName,
metricType, common.DefaultTopK, sp)
common.CheckErr(t, errRange, false, "range_filter must be greater than radius for IP/COSINE")
common.CheckErr(t, errRange, false, "range_filter(10) must be greater than radius(20) for IP/COSINE")
}
}

Expand Down Expand Up @@ -1350,7 +1350,7 @@ func TestRangeSearchScannBinary(t *testing.T) {
sp.AddRangeFilter(100)
_, errRange := mc.Search(ctx, collName, []string{}, "", []string{"*"}, queryVec, common.DefaultBinaryVecFieldName,
metricType, common.DefaultTopK, sp)
common.CheckErr(t, errRange, false, "range_filter must be less than radius for L2/HAMMING/JACCARD")
common.CheckErr(t, errRange, false, "range_filter(100) must be less than radius(0) for L2/HAMMING/JACCARD")
}
}

Expand Down

0 comments on commit b1a1087

Please sign in to comment.