Details
-
New Feature
-
Resolution: Done
-
Major - P3
-
None
-
None
Description
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);
}
Attachments
Issue Links
- is depended on by
-
SERVER-890 map/reduce
-
- Closed
-
- related to
-
SERVER-257 Complex key support for group command
-
- Closed
-