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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.4.8
    • Fix Version/s: 2.5.5
    • Component/s: Geo
    • Labels:
    • Environment:
    • Operating System:
      ALL
    • Steps To Reproduce:
      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

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

            Dates

            • Created:
              Updated:
              Resolved: