incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Clairon <clai...@gmail.com>
Subject Re: Random issue with reduce
Date Sat, 28 Mar 2009 11:08:04 GMT
Nop !

Here is the test  map function :

function(doc){
  emit("key", 1);
}

and the reduce function:

function(key, values){
  return values;
}

That work well for a large usecase but sometime, I get this strange behavior...

On Sat, Mar 28, 2009 at 11:56 AM, Sven Helmberger
<sven.helmberger@gmx.de> wrote:
> Nicolas Clairon schrieb:
>>
>> Hi !
>>
>> I get problem with reduce. For the following map result :
>>
>> key => 1
>> key => 1
>> key => 1
>> key => 1
>> key => 1
>> key => 1
>> key => 1
>> key => 1
>> ...
>>
>> I sometime get this reduce result:
>>
>> key =>
>> [[1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,],...]
>>
>> while the expected result is of course :
>>
>> key => [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,...]
>>
>> I can't figure out why I get sometime nested lists in reduce result.
>>
>> I'm using the latest trunk (0.9) of couchdb on a Linux box (Ubuntu
>> 8.04) with erlang 12b.3
>> but I also got this problem with 0.8 version.
>>
>> Does anyone went through this issues already ?
>>
>> Nicolas
>>
>> PS : I'm so sorry for my bad english...
>
> Do you account for rereduce in your reduce function?
>
> http://wiki.apache.org/couchdb/Introduction_to_CouchDB_views
>
> Regards,
> Sven Helmberger
>

Mime
View raw message