couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jarrod Roberson <>
Subject Re: Multiple map reduce stages
Date Tue, 18 May 2010 18:26:21 GMT
On Tue, May 18, 2010 at 5:52 AM, Kropp, Henning <>wrote:

> Hi,
> as far as I know working with map reduce commonly involves multiple map
> and reduce stages. A view in couchdb solely consists of one map and if
> necessary one reduce stage!?

actually it does a Reduce stage on each bucket of results from the b-tree
and then a re-reduce phase on all the results of the b-tree bucket results.
Your reduce function has to handle the initial reduce and the re-reduce
possibility as well. Personally I wish there were two functions one for
reduce and one for re-reduce, it would get make things clearer and easier to
manage as having to manage reducing the view results AND the reduced results
which may be a completely different data structure can be really confusing
and error prone in the maintenance phase of a project.

Jarrod Roberson

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