| Steps To Reproduce: |
2.5.5-pre-
> db.c.insert({loc:{type:"Point",coordinates:[0,0]}})
|
Insert WriteResult({ "ok" : 1, "n" : 1 })
|
> db.c.ensureIndex({loc:"2dsphere"})
|
> db.c.find({$or:[{"loc":{$geoWithin:{$geometry:{type:"Polygon",coordinates:[[[1,1],[-1,1],[-1,-1],[1,-1],[1,1]]]}}}}]})
|
{ "_id" : ObjectId("528fcfc56ce2fec2710a1365"), "loc" : { "type" : "Point", "coordinates" : [ 0, 0 ] } }
|
> db.c.find({$or:[{"loc":{$geoWithin:{$geometry:{type:"Polygon",coordinates:[[[1,1],[-1,1],[-1,-1],[1,-1],[1,1]]]}}}}]}).sort({a:1})
|
{ "_id" : ObjectId("528fcfc56ce2fec2710a1365"), "loc" : { "type" : "Point", "coordinates" : [ 0, 0 ] } }
|
> db.c.find({$or:[{"loc":{$geoWithin:{$geometry:{type:"Polygon",coordinates:[[[1,1],[-1,1],[-1,-1],[1,-1],[1,1]]]}}}}]}).sort({a:1}).count()
|
1
|
2.4.9-pre-
> db.c.insert({loc:{type:"Point",coordinates:[0,0]}})
|
> db.c.ensureIndex({loc:"2dsphere"})
|
> db.c.find({$or:[{"loc":{$geoWithin:{$geometry:{type:"Polygon",coordinates:[[[1,1],[-1,1],[-1,-1],[1,-1],[1,1]]]}}}}]})
|
error: { "$err" : "$or may not contain 'special' query", "code" : 13291 }
|
> db.c.find({$or:[{"loc":{$geoWithin:{$geometry:{type:"Polygon",coordinates:[[[1,1],[-1,1],[-1,-1],[1,-1],[1,1]]]}}}}]}).sort({a:1})
|
{ "_id" : ObjectId("528fcfc55142cd7d1e23d1c5"), "loc" : { "type" : "Point", "coordinates" : [ 0, 0 ] } }
|
> db.c.find({$or:[{"loc":{$geoWithin:{$geometry:{type:"Polygon",coordinates:[[[1,1],[-1,1],[-1,-1],[1,-1],[1,1]]]}}}}]}).sort({a:1}).count()
|
Fri Nov 22 13:44:19.839 count failed: {
|
"errmsg" : "exception: $or may not contain 'special' query",
|
"code" : 13291,
|
"ok" : 0
|
} at src/mongo/shell/query.js:180
|
|