Uploaded image for project: 'Couchbase node.js Client Library'
  1. Couchbase node.js Client Library
  2. JSCBC-589

Geo-Spatial query lat-lon arguments flipped

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.6.8, 3.0.0-beta.1
    • 2.6.7, 3.0.0-alpha2
    • library
    • 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)

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            brett19 Brett Lawson
            daniel.roberts Daniel Roberts (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty