couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Goodlad <da...@goodlad.ca>
Subject Re: Reduce function results
Date Thu, 20 May 2010 21:52:33 GMT
On Thu, May 20, 2010 at 9:38 PM, Tom Sante <tom.sante@gmail.com> wrote:
> Hi,
>
> I have a reduce function like this:
> [snip]
> So for some reason if there is only 1 element to be reduced, on the line of
> res[v_n]={'mi':v,'ma':v,'c':1,'t':v};
> v becomes v={} and not the actual number. Any ideas why?
>
> I tested the reduce function with the command line 'js' and send it the
> above test keys manually as function argument and then it does result in the
> correct return:
> "01:00:000074" -> {raw: {mi: -0.213, ma: -0.213, c: 1, t: -0.213}}
> "01:00:000084" -> {raw: {mi: -0.213, ma: -0.213, c: 1, t: -0.213}}

Sounds like you need to specify group_level; Try playing around in
Futon, you'll see a group_level dropdown.

Dave

Mime
View raw message