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

geoNear result is very different from previous versions.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Gone away
    • Affects Version/s: 2.5.4
    • Fix Version/s: None
    • Component/s: Geo
    • Labels:
    • Operating System:
      ALL

      Description

      Given the command:

      { "geoNear" : "testcollection", "near" : [0.0, 0.0], "num" : 100, "distanceMultiplier" : 1.0, "maxDistance" : 100.0 }

      < 2.5.4 returns this result:

      { "ns" : "csharpdriverunittests.testcollection", "near" : "1100000000000000000000000000000000000000000000000000", "results" : [{ "dis" : 1.4142135623730952, "obj" : { "_id" : ObjectId("52d02162dd63bf086404c6c1"), "Location" : [1.0, 1.0], "Name" : "One", "Type" : "Museum" } }, { "dis" : 2.23606797749979, "obj" : { "_id" : ObjectId("52d02162dd63bf086404c6c2"), "Location" : [1.0, 2.0], "Name" : "Two", "Type" : "Coffee" } }, { "dis" : 3.1622776601683795, "obj" : { "_id" : ObjectId("52d02162dd63bf086404c6c3"), "Location" : [1.0, 3.0], "Name" : "Three", "Type" : "Library" } }, { "dis" : 4.1231056256176606, "obj" : { "_id" : ObjectId("52d02162dd63bf086404c6c4"), "Location" : [1.0, 4.0], "Name" : "Four", "Type" : "Museum" } }, { "dis" : 5.0990195135927845, "obj" : { "_id" : ObjectId("52d02162dd63bf086404c6c5"), "Location" : [1.0, 5.0], "Name" : "Five", "Type" : "Coffee" } }], "stats" : { "time" : 0, "btreelocs" : 0, "nscanned" : 5, "objectsLoaded" : 5, "avgDistance" : 3.2069368678503425, "maxDistance" : 5.09903122655428 }, "ok" : 1.0 }

      2.5.4 now returns the following result.

      { "results" : [{ "dis" : 1.4142135623730952, "obj" : { "_id" : ObjectId("52d020e9dd63bf0ae4d350e4"), "Location" : [1.0, 1.0], "Name" : "One", "Type" : "Museum" } }, { "dis" : 2.23606797749979, "obj" : { "_id" : ObjectId("52d020e9dd63bf0ae4d350e5"), "Location" : [1.0, 2.0], "Name" : "Two", "Type" : "Coffee" } }, { "dis" : 3.1622776601683795, "obj" : { "_id" : ObjectId("52d020e9dd63bf0ae4d350e6"), "Location" : [1.0, 3.0], "Name" : "Three", "Type" : "Library" } }, { "dis" : 4.1231056256176606, "obj" : { "_id" : ObjectId("52d020e9dd63bf0ae4d350e7"), "Location" : [1.0, 4.0], "Name" : "Four", "Type" : "Museum" } }, { "dis" : 5.0990195135927845, "obj" : { "_id" : ObjectId("52d020e9dd63bf0ae4d350e8"), "Location" : [1.0, 5.0], "Name" : "Five", "Type" : "Coffee" } }], "stats" : { "nscanned" : NumberLong(0), "objectsLoaded" : NumberLong(5), "avgDistance" : 3.2069368678503425, "maxDistance" : 5.0990195135927845, "time" : 1 }, "ok" : 1.0 }

      These are somewhat significantly different, including missing "ns" and "near" top-level fields and the "stats" document containing different values as well, notable missing "btreelocs" and "nscanned".

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: