Details
-
Bug
-
Resolution: Fixed
-
Major
-
2.6.7, 3.0.0-alpha2
-
1
Description
The function couchbase.SerchQuery.geoDistanceQuery() should take parameters in the order (lat,lon,dist), as the sdk source denotes here. However, at some point in the sdk the lat and lon are switched - meaning that to search for London, with lat/lon of 51.5 N,0 E, we must call with geoDistanceQuery(0, 51.5, dist).
In the sort function couchbase.SearchSort.geoDistance, the parameters are in the correct order (ie, London is searched by geoDistance(field, 51.5, 0)
This discrepancy has potential to cause many issues with users trying to sort their results
This issue also applies to geoBoundingBoxQuery() (takes lon,lat,lon,lat despite code saying lat,lon,lat,lon)