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

$within $centerSphere not implemented

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.7.5
    • Component/s: Geo
    • None
    • Environment:
      Windows 7 64 bit using latest server build downloaded 2011-01-25
    • ALL

      When I run this query using the C# driver:

      "{ \"Location\" : { \"$within\" :

      { \"$centerSphere\" : [[-74, 40.74], 1] }

      } }"

      I get this error:

      MongoDB.DriverOnlineTests.MongoCollectionTests.TestFindWithinCircleSphericalTrue:
      MongoDB.Driver.MongoQueryException : QueryFailure flag set: Spherical distance would require wrapping, which isn't implemented yet (response:

      { "$err" : "Spherical distance would require wrapping, which isn't implemented yet", "code" : 13462 }

      )

      Here's the same error reproduced in shell:

      > use onlinetests
      switched to db onlinetests
      > db.testcollection.find()

      { "_id" : ObjectId("4d3f20f0e447ad602837252f"), "Location" : [ -74, 40.74 ], "Na me" : "10gen", "Type" : "Office" } { "_id" : ObjectId("4d3f20f0e447ad6028372530"), "Location" : [ -75, 40.74 ], "Na me" : "Two", "Type" : "Coffee" } { "_id" : ObjectId("4d3f20f0e447ad6028372531"), "Location" : [ -74, 41.73 ], "Na me" : "Three", "Type" : "Coffee" }

      > db.testcollection.find({ "Location" : { "$within" :

      { "$centerSphere" : [[-74, 40.74], 1] }

      } })
      error: {
      "$err" : "Spherical distance would require wrapping, which isn't impleme
      nted yet",
      "code" : 13462
      }
      >

            Assignee:
            greg_10gen Greg Studer
            Reporter:
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: