Google App Engine Python Search Api's Location-based queries (Geosearch) Issues
There can be two reasons for this :
1 - miles instead of km
2 - conversion numbers (for example 35,322.2 is 35322.2 ? km ? miles ?)
i suggest to check what exactly are the numbers processed when executing distance function, you can programmatically output this data in some logs
Hope it helps
I have implemented GAE's Python Search Api and am trying to query based on distance from given geopoint.
My query string is: "distance(location, geopoint(XXX, YYY)) < ZZZ". However, for some reason on the production server, this query string is returning items where the distance is greater than the ZZZ parameter.
Below are actual numbers (production) demonstrating the inaccuracies:
Actual Distance: 343.9m
Query Distance that still gets the result: 325m
Actual Distance: 18,950.3
Query Distance that still gets the result: 13,499m
Actual Distance: 55,979.0
Query Distance that still gets the result: 44,615m
Actual Distance: 559,443.6
Query Distance that still gets the result: 451,167m
Actual Distance: 53.4
Query Distance that still gets the result: 46m
Actual Distance: 35,322.2
Query Distance that still gets the result: 30,808m
Actual Distance: 190.2
Query Distance that still gets the result: 143m
On my development server, these inaccuracies do not exist. I am able to query down to the exact meter and get the expected results.
What could cause this and how to fix it so that I get accurate query results in production? Is anyone else getting the same issue?