Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
2.6.10, 3.0.4
-
Query Optimization
-
ALL
-
Description
The following contrived MapReduce:
db.test.mapReduce(
|
function() { |
var map = new Map() |
map.put("A", "B") |
|
|
emit(map.get("A"), { count: 1 }) |
},
|
function(key, records) { |
counter = { count: 0 }
|
|
for (var idx = 0; idx < records.length; idx++) { |
counter.count += records[idx].count
|
}
|
|
return counter |
},
|
{
|
out: { inline: 1 }
|
}
|
)
|
displays the following error:
uncaught exception: map reduce failed:{
|
"errmsg" : "exception: ReferenceError: friendlyEqual is not defined\n at Map._get (src/mongo/shell/types.js:516:13)\n at Map.get (src/mongo/shell/types.js:505:17)\n at _funcs1 (_funcs1:4:14) at src/mongo/shell/types.js:516",
|
"code" : 16722,
|
"ok" : 0
|
}
|
It would appear to me that perhaps utils.js is not loaded?