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 reduce function is set to true. if your reduce function returns data that is structurally different from its input, you need to specially take care of the rereduce
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 have
to be prepared to deal with it if you are doing anything fancy.

sorry for the rather lame explanation. :-)

Cheers
Jan
--

Reply via email to