You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Dmitrii Dimandt <dm...@gmail.com> on 2008/12/01 09:22:38 UTC

Simple rereduce introduction tutorial

Does anyone have an easy-to-understand introduction to/tutorial on the 
rereduce argument in the reduce function?

I *sort of* understand why it's there and I have a vague understanding of 
how to work with it, but this understanding is just that — vague.

What I would really like to see is a couple of examples and explanations on 
how and when it should be taken into account when creating the reduce 
function

Re: Simple rereduce introduction tutorial

Posted by Dmitrii Dimandt <dm...@dmitriid.com>.

--On December 1, 2008 6:23:45 AM -0500 Jedediah Smith 
<je...@silencegreys.com> wrote:

>
> http://wiki.apache.org/couchdb/Introduction_to_CouchDB_views
>
> I just updated that page with a more detailed explanation of reduce and
> rereduce.
>


Thank you! The list of intermediate values in the explanation cleared 
everything for me :)

> Rereduce must *always* be taken into account, though it can often be
> handled implicitly by the same code as reduce.
>


In my case it was as simple as calculating sums of money, so the code will 
remain the same :)



> Here is a simple example of a view in which that is not the case:
> http://github.com/jchris/couchrest/tree/master/examples/word_count/views/
> markov
>

Yeah, I looked at it and couldn't wrap my head around it :) Now everythng 
is much clearer :)


> Dmitrii Dimandt wrote:
>> Does anyone have an easy-to-understand introduction to/tutorial on the
>> rereduce argument in the reduce function?
>>
>> I *sort of* understand why it's there and I have a vague understanding
>> of how to work with it, but this understanding is just that — vague.
>>
>> What I would really like to see is a couple of examples and explanations
>> on how and when it should be taken into account when creating the reduce
>> function
>>
>





Re: Simple rereduce introduction tutorial

Posted by Jedediah Smith <je...@silencegreys.com>.
http://wiki.apache.org/couchdb/Introduction_to_CouchDB_views

I just updated that page with a more detailed explanation of reduce and 
rereduce.

Rereduce must *always* be taken into account, though it can often be 
handled implicitly by the same code as reduce.

Here is a simple example of a view in which that is not the case:
http://github.com/jchris/couchrest/tree/master/examples/word_count/views/markov

Dmitrii Dimandt wrote:
> Does anyone have an easy-to-understand introduction to/tutorial on the 
> rereduce argument in the reduce function?
> 
> I *sort of* understand why it's there and I have a vague understanding 
> of how to work with it, but this understanding is just that — vague.
> 
> What I would really like to see is a couple of examples and explanations 
> on how and when it should be taken into account when creating the reduce 
> function
>