incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Lehnardt <>
Subject Re: Combine ( / rereduce?) implementation in CouchDB
Date Wed, 17 Sep 2008 14:45:21 GMT

On Sep 16, 2008, at 13:32, Jaap van der Plas wrote:

> Greets,
> I've been searching around and found various hints towards the third
> parameter of reduce-functions but I have not been able to find a
> description of when exactly it is invoked, and if it is possible to
> avoid your reduce function to be used in this way. It is also referred
> to as re-reduce sometimes?
> Would anyone be able to shed some light on this for, or point me to
> resources where I can learn more about this?

rereduce is a phase that the view engine might decide to run to further
reduce its input. if it runs rereduce, the third parameter to your  
function is set to true. if your reduce function returns data that is  
different from its input, you need to specially take care of the  
call. in case of a simple `return sum(values)` reduce and rereduce work
the same way. you cannot rely on rereduce being run or not, you just  
to be prepared to deal with it if you are doing anything fancy.

sorry for the rather lame explanation. :-)


View raw message