Using the mongo shell, mongod accepts as command both mapreduce and mapReduce
> db.runCommand(
{
mapreduce: 'orders',
...
}
)
{
"result" : "testName",
"timeMillis" : 36,
"counts" : {
"input" : 0,
"emit" : 0,
"reduce" : 0,
"output" : 0
},
"ok" : 1
}
mongod> db.runCommand(
{
mapReduce: 'orders',
...
}
)
{
"result" : "testName",
"timeMillis" : 40,
"counts" : {
"input" : 0,
"emit" : 0,
"reduce" : 0,
"output" : 0
},
"ok" : 1
}
However, using the mongo shell, mongos only accepts the command mapreduce and will error out with mapReduce.
mongos> db.runCommand(
{
mapReduce: 'orders',
...
}
)
{ "ok" : 0, "errmsg" : "no such cmd: mapReduce" }
- duplicates
-
SERVER-5588 mapReduce and eval not recognized by mongos
-
- Closed
-