mirror of
https://github.com/fluencelabs/redis
synced 2025-04-29 12:32:14 +00:00
Geo: fuzzy test inconsistency report fixed to show all points.
We need to report all the points added into the set, not just the ones matching the Tcl distance algo.
This commit is contained in:
parent
056c81e4a7
commit
f3add0692f
@ -254,10 +254,11 @@ start_server {tags {"geo"}} {
|
|||||||
for {set j 0} {$j < 20000} {incr j} {
|
for {set j 0} {$j < 20000} {incr j} {
|
||||||
geo_random_point lon lat
|
geo_random_point lon lat
|
||||||
lappend argv $lon $lat "place:$j"
|
lappend argv $lon $lat "place:$j"
|
||||||
if {[geo_distance $lon $lat $search_lon $search_lat] < $radius_m} {
|
set distance [geo_distance $lon $lat $search_lon $search_lat]
|
||||||
|
if {$distance < $radius_m} {
|
||||||
lappend tcl_result "place:$j"
|
lappend tcl_result "place:$j"
|
||||||
lappend debuginfo "place:$j $lon $lat [expr {[geo_distance $lon $lat $search_lon $search_lat]/1000}] km"
|
|
||||||
}
|
}
|
||||||
|
lappend debuginfo "place:$j $lon $lat [expr {$distance/1000}] km"
|
||||||
}
|
}
|
||||||
r geoadd mypoints {*}$argv
|
r geoadd mypoints {*}$argv
|
||||||
set res [lsort [r georadius mypoints $search_lon $search_lat $radius_km km]]
|
set res [lsort [r georadius mypoints $search_lon $search_lat $radius_km km]]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user