mapreduce - Using different keys for map & reduce -
i have current couch db stores activities happen on different nodes. i'm getting count of how many activities have happened on each node using following:
map:
function(doc) { emit(doc.node._id, 1); } reduce:
_sum this works great! now, i'd allow filterable timestamp. first thought change map this:
function(doc) { emit([doc.node._id, doc.created], 1); } however that, of course, added created flag key, reduce doesn't work how wanted anymore.
is there way can map node._id , created, reduce node._id?
edit: forgot mention, looked using group_level, works 1 key, , need able pass multiple keys index.
Comments
Post a Comment