my $geonear function is not returning the expected

XMLWordPrintableJSON

    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      my $geonear function is not returning the expected array of nearest driver in my collection.

      i am running these queries to get the result.

      to create indexes for geonear i used:

      db.dectar_drivers.createIndex({point:"2dsphere"});

      to find the nearest driver i have used:

      db.dectar_drivers.aggregate([
      {
      $geoNear: {
      near: { type: "Point", coordinates: [ 22.7323132 ,75.8753951] },
      distanceField: "total_mileage",
      maxDistance: 200,
      includeLocs: "loc",
      num: 5,
      spherical: true
      }
      }
      ])

            Assignee:
            Eric Sedor
            Reporter:
            Shubhanshu Soni
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: