[SERVER-12399] $geoNear operator does not work in sharded cluster Created: 17/Jan/14  Updated: 10/Dec/14  Resolved: 22/Jan/14

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Andrew Emil (Inactive) Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: 26qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-1981 Support $near and $nearSphere predica... Closed
Related
Operating System: ALL
Participants:

 Description   

$geoNear works fine on standalone instances, but not does not seem to work in a sharded cluster.

The following was run against a build from 1/16

mongos> sh.addShard("localhost:27017")
{ "shardAdded" : "shard0000", "ok" : 1 }
mongos> sh.enableSharding("test")
{ "ok" : 1 }
mongos> sh.shardCollection("test.test", {_id:1})
{ "collectionsharded" : "test.test", "ok" : 1 }
mongos> use test
switched to db test
mongos> db.test.find()
{ "_id" : 0, "loc" : [  0,  0 ] }
mongos> db.test.ensureIndex({loc: "2d"})
mongos> db.test.find()
{ "_id" : 0, "loc" : [  0,  0 ] }
mongos> db.test.find({loc: {$geoNear: [0,0]}})
error: { "$err" : "use geoNear command rather than $near query", "code" : 13501 }



 Comments   
Comment by Daniel Pasette (Inactive) [ 22/Jan/14 ]

duplicate SERVER-1981

Generated at Thu Feb 08 03:28:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.