couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Bodunov <>
Subject Re: _sum function in Erlang reduce doesn't work
Date Thu, 29 Apr 2010 06:19:32 GMT
Ah, ok.. Yes, _just_ "_sum" as a body of "reduce" function works fine.
I just could not think of such approach because imho it has very
limited applicability.
Thanks for clarification.



No, you misunderstood.

The exact text of the reduce in the design doc should just be "_sum". That
is not a function call but a special sentinel that couch recognizes as
signalling a summation reduction.

If that doesn't work please file a bug report on JIRA.

On Apr 28, 2010 6:29 PM, "Ivan Bodunov" <> wrote:


I have a view in Erlang. Its reduce() function looks like following:

       fun(Keys, Values, ReReduce) -> _sum(Values) end.

>>From #couchdb irc I understood that it should work (similarly to JS view).
But Couch produces crash report when such view is triggered. Crash report is
behind the following link:


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