-
Type:
Bug
-
Resolution: Duplicate
-
Priority:
Major - P3
-
None
-
Affects Version/s: 2.5.1
-
Component/s: None
-
None
-
ALL
-
None
-
None
-
None
-
None
-
None
-
None
-
None
> db.test.find({$query: {random: -14 } }).explain()
Fri Jul 26 16:51:50.251 error: {
"$err" : "bad query: BadValue unknown top level operator: $query",
"code" : 16810
} at src/mongo/shell/query.js:131
> db.test.getIndexes()
[
{
"v" : 1,
"key" : {
"_id" : 1
},
"ns" : "test.test",
"name" : "_id_"
}
]
Fri Jul 26 16:51:07.277 [initandlisten] MongoDB starting : pid=81884 port=27017 dbpath=/data/db/ 64-bit host=Gianfranco-10gen.local Fri Jul 26 16:51:07.277 [initandlisten] Fri Jul 26 16:51:07.277 [initandlisten] ** NOTE: This is a development version (2.5.1) of MongoDB. Fri Jul 26 16:51:07.277 [initandlisten] ** Not recommended for production. Fri Jul 26 16:51:07.277 [initandlisten] Fri Jul 26 16:51:07.277 [initandlisten] db version v2.5.1 Fri Jul 26 16:51:07.278 [initandlisten] git version: dd226d98a53286a5af892f0b81a5252dd62f7444 Fri Jul 26 16:51:07.278 [initandlisten] build info: Darwin bs-osx-106-x86-64-2.10gen.cc 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:32:41 PDT 2011; root:xnu-1504.15.3~1/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49
https://github.com/mongodb/mongo/blob/r2.5.1/src/mongo/shell/query.js#L131
The only change I can see in that portion of code is:
SERVER-10134Report errors during GetMore processing
This is necessary forSERVER-5932(aggregation returning cursors)
https://github.com/mongodb/mongo/commit/0f43cfcbe063c1f4615ce362e751155218224bec
- duplicates
-
SERVER-6767 Interpret $query as special so you can copy profiler/logged queries into shell
-
- Closed
-