incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "paul jobs" <webjog...@gmail.com>
Subject Re: clustering based on 2 columns
Date Mon, 22 Dec 2008 04:13:40 GMT
this is hte result i need but for a particular date
Key
Value  *"animgifts"*88653*"anoninbox"*31*"areucute"*698*"bdayecards"*12756*
"crushometer"*252*"datevalentine"*637*"igarden"*43*"luvgifts"*83*
"newstickers"*585*"ownmenow"*72*"animgifts"*88652*"anoninbox"*31*"areucute"*
698*"bdayecards"*12746*"crushometer"*252*"datevalentine"*637*"igarden"*43*
"luvgifts"*83*"newstickers"*585*"ownmenow"*72
function(doc) {
  if(doc.date=="2008-12-21")
  emit(doc.appname, doc.count);
}
 function(keys, values, rereduce) { return sum(values) }

my question is how to pass an argument to the view query

On 12/21/08, paul jobs <webjogger@gmail.com> wrote:
>
> antony this doesnt help
> Key
> Value  *"2008-12-20"*17854*"2008-12-21"* 114536
> i get this result when i give your map-reduce view, it doesnt collate by
> appnames after collating by date
>
> On 12/21/08, Antony Blakey <antony.blakey@gmail.com> wrote:
>>
>> map:    function(doc) { emit(doc.date, doc.count) }
>> reduce: function(keys, values, rereduce) { return sum(values) }
>>
>> query:  ...?group=true&key="2008-12-21"
>>
>> Antony Blakey
>> --------------------------
>> CTO, Linkuistics Pty Ltd
>> Ph: 0438 840 787
>>
>> Success is not the key to happiness. Happiness is the key to success.
>>  -- Albert Schweitzer
>>
>>
>

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