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

$maxDistance with 2dsphere index doesn't handle distances less than 10e-10

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.5.5
    • 2.4.8
    • Geo
    • ALL
    • Hide

      2.4.9-pre-

      > db.c.insert({loc:[0,0]})
      > db.c.ensureIndex({loc:"2dsphere"})
      > db.c.find({loc:{$nearSphere:[0,0],$maxDistance:10e-100}})
      >

      2.5.5-pre-

      > db.c.insert({loc:[0,0]})
      Insert WriteResult({ "ok" : 1, "n" : 1 })
      > db.c.ensureIndex({loc:"2dsphere"})
      > db.c.find({loc:{$nearSphere:[0,0],$maxDistance:10e-100}})
      { "_id" : ObjectId("52a264079ff3a7c681503c83"), "loc" : [ 0, 0 ] }

      Show
      2.4.9-pre- > db.c.insert({loc:[0,0]}) > db.c.ensureIndex({loc:"2dsphere"}) > db.c.find({loc:{$nearSphere:[0,0],$maxDistance:10e-100}}) > 2.5.5-pre- > db.c.insert({loc:[0,0]}) Insert WriteResult({ "ok" : 1, "n" : 1 }) > db.c.ensureIndex({loc:"2dsphere"}) > db.c.find({loc:{$nearSphere:[0,0],$maxDistance:10e-100}}) { "_id" : ObjectId("52a264079ff3a7c681503c83"), "loc" : [ 0, 0 ] }

    Attachments

      Activity

        People

          Unassigned Unassigned
          luke.lovett Luke Lovett
          Votes:
          0 Vote for this issue
          Watchers:
          1 Start watching this issue

          Dates

            Created:
            Updated:
            Resolved: