couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "paul jobs" <>
Subject clustering based on 2 columns
Date Sun, 21 Dec 2008 22:49:22 GMT
*Hope this query is useful to more people who are using couchdb to collect
stats for their web-apps

Map1 collates based on date map2 collates based on name of application
map3 is not quite what i want,
I want to do what map2 does but only for say "2008-12-21" ie today
how do i get today's statistics?
Thanks a lot

map1*:function(doc) { emit(, doc.count); }
*reduce*:function(keys, values) { return sum(values)}

*map2*:function(doc) {
emit(doc.appname, doc.count); }*reduce*:function(keys, values) { return

*map3*:function(doc) {
emit([doc.appname,], doc.count); }
*reduce*:function(keys, values) { return sum(values)}

*["animgifts", "2008-12-20"]*10420*["animgifts",
"2008-12-20"]*67*["anoninbox", "2008-12-21"]*31*["areucute", "2008-12-20"]*
434*["areucute", "2008-12-21"]*537*["bdayecards",
"2008-12-21"]*10390*["crushometer", "2008-12-20"]*69*["crushometer",

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message