Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-23927

geonear aggregation error for coordinates with negative values

    • Type: Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Aggregation Framework
    • None
    • ALL
    • Hide
      {"_id" : 5,"driver_id" : 685,"status" : "F","shift_status" : "OUT","update_date" : "0000-00-00 00:00:00","loc" : {"type" : "Point","coordinates" : [-118.25,34.05]},"driverinfo":[]}
      
      {"_id" : 2,"driver_id" : 680,"status" : "F","shift_status" : "OUT","update_date" : "2015-03-11 19:42:36","loc":{"type" : "Point","coordinates" : [76.918805,11.02214]},"driverinfo":[]}
      

      query
      -------

      db.collectionname.aggregate(
      {$geoNear: {near: {coordinates: [ 77.0107990 , 11.0249990 ] },
          distanceField:"distance",
          spherical: true}}
      )//.itcount();
      
      Show
      {"_id" : 5,"driver_id" : 685,"status" : "F","shift_status" : "OUT","update_date" : "0000-00-00 00:00:00","loc" : {"type" : "Point","coordinates" : [-118.25,34.05]},"driverinfo":[]} {"_id" : 2,"driver_id" : 680,"status" : "F","shift_status" : "OUT","update_date" : "2015-03-11 19:42:36","loc":{"type" : "Point","coordinates" : [76.918805,11.02214]},"driverinfo":[]} query ------- db.collectionname.aggregate( {$geoNear: {near: {coordinates: [ 77.0107990 , 11.0249990 ] }, distanceField:"distance", spherical: true}} )//.itcount();

      While using geonear aggregation it returns the distance for only for lat and long with postive coordinates

            Assignee:
            kelsey.schubert@mongodb.com Kelsey Schubert
            Reporter:
            shibish shibimukesh
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: