Created
January 13, 2012 20:28
-
-
Save james-carr/1608538 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
map = function(){ | |
this.log.forEach(function(logItem){ | |
if(logItem.action == 'Call' && logItem.user != ''){ | |
emit({user: logItem.user, time:logItem.time}, 1); | |
} | |
}); | |
}; | |
reduce = function(key, values){ | |
return values; | |
}; | |
db.leads.mapReduce(map, reduce, {out:'leadCallsReduce'}); |
Author
james-carr
commented
Jan 13, 2012
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment