mirror of https://github.com/tidwall/tile38.git
Merge branch 'fix/distance' of https://github.com/iwpnd/tile38 into iwpnd-fix/distance
This commit is contained in:
commit
e1d9756c6d
|
@ -28,10 +28,13 @@ func keys_KNN_test(mc *mockServer) error {
|
||||||
{"SET", "mykey", "3", "POINT", 12, 19}, {"OK"},
|
{"SET", "mykey", "3", "POINT", 12, 19}, {"OK"},
|
||||||
{"SET", "mykey", "4", "POINT", -5, 5}, {"OK"},
|
{"SET", "mykey", "4", "POINT", -5, 5}, {"OK"},
|
||||||
{"SET", "mykey", "5", "POINT", 33, 21}, {"OK"},
|
{"SET", "mykey", "5", "POINT", 33, 21}, {"OK"},
|
||||||
|
{"SET", "mykey", "6", "POINT", 52, 13}, {"OK"},
|
||||||
{"NEARBY", "mykey", "LIMIT", 10, "POINTS", "POINT", 20, 20}, {
|
{"NEARBY", "mykey", "LIMIT", 10, "POINTS", "POINT", 20, 20}, {
|
||||||
"[0 [[2 [19 19]] [3 [12 19]] [5 [33 21]] [1 [5 5]] [4 [-5 5]]]]"},
|
"[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]]"},
|
{"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, "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]]]`},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue