-
Type: New Feature
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: JavaScript, Usability
-
None
This is very similar to group() except group only allows a single key to be extracted per object; map would allow emitting several. And use the map / reduce nomenclature.
Needs to work with mongos too.
db.coll.mapreduce(queryexpr, mapf, reducef);
db.stuff.mapreduce(
{},
function(obj) { obj.tags.forEach(function(t){emit(t,
);} },
function(k,values) {
var res =
;
values.forEach( function(v)
);
emit(k, res);
}
- is depended on by
-
SERVER-890 map/reduce
- Closed
- related to
-
SERVER-257 Complex key support for group command
- Closed