> db.c.insert({})
|
WriteResult({ "nInserted" : 1 })
|
> db.c.insert({})
|
WriteResult({ "nInserted" : 1 })
|
> db.c.mapReduce(function() { emit(0, 0); }, function(k, v) { return db._name; }, {out: "out"})
|
2017-03-10T16:37:23.741-0500 E QUERY [main] Error: map reduce failed:{
|
"ok" : 0,
|
"errmsg" : "ReferenceError: db is not defined :\n_funcs2@:1:29\n",
|
"code" : 139,
|
"codeName" : "JSInterpreterFailure"
|
} :
|
_getErrorWithCode@src/mongo/shell/utils.js:25:13
|
DBCollection.prototype.mapReduce@src/mongo/shell/collection.js:1411:1
|
@(shell):1:1
|
> db.c.mapReduce(function() { emit(0, db._name); }, function(k, v) { return 1; }, {out: "out"})
|
2017-03-10T16:37:33.018-0500 E QUERY [main] Error: map reduce failed:{
|
"ok" : 0,
|
"errmsg" : "ReferenceError: db is not defined :\n_funcs1@:1:25\n",
|
"code" : 139,
|
"codeName" : "JSInterpreterFailure"
|
} :
|
_getErrorWithCode@src/mongo/shell/utils.js:25:13
|
DBCollection.prototype.mapReduce@src/mongo/shell/collection.js:1411:1
|
@(shell):1:1
|