diff --git a/tests/keys_search_test.go b/tests/keys_search_test.go index ff236d81..ad225608 100644 --- a/tests/keys_search_test.go +++ b/tests/keys_search_test.go @@ -28,10 +28,13 @@ func keys_KNN_test(mc *mockServer) error { {"SET", "mykey", "3", "POINT", 12, 19}, {"OK"}, {"SET", "mykey", "4", "POINT", -5, 5}, {"OK"}, {"SET", "mykey", "5", "POINT", 33, 21}, {"OK"}, + {"SET", "mykey", "6", "POINT", 52, 13}, {"OK"}, {"NEARBY", "mykey", "LIMIT", 10, "POINTS", "POINT", 20, 20}, { - "[0 [[2 [19 19]] [3 [12 19]] [5 [33 21]] [1 [5 5]] [4 [-5 5]]]]"}, - {"NEARBY", "mykey", "LIMIT", 10, "IDS", "POINT", 20, 20, 4000000}, {"[0 [2 3 5 1 4]]"}, + "[0 [[2 [19 19]] [3 [12 19]] [5 [33 21]] [1 [5 5]] [4 [-5 5]] [6 [52 13]]]]"}, + {"NEARBY", "mykey", "LIMIT", 10, "IDS", "POINT", 20, 20, 4000000}, {"[0 [2 3 5 1 4 6]]"}, {"NEARBY", "mykey", "LIMIT", 10, "IDS", "POINT", 20, 20, 1500000}, {"[0 [2 3 5]]"}, + {"NEARBY", "mykey", "LIMIT", 10, "DISTANCE", "POINT", 52, 13, 100}, {`[0 [[6 {"type":"Point","coordinates":[13,52]} 0]]]`}, + {"NEARBY", "mykey", "LIMIT", 10, "DISTANCE", "POINT", 52.1, 13.1, 100000}, {`[0 [[6 {"type":"Point","coordinates":[13,52]} 13053.885940801563]]]`}, }) }