incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ning Tan <ning...@gmail.com>
Subject Re: scaling dimensions in reduce
Date Tue, 08 Dec 2009 21:01:25 GMT
On Tue, Dec 8, 2009 at 3:50 PM, Matteo Caprari <matteo.caprari@gmail.com> wrote:
> Hello.
>
> Given a database where each document represents a data point
> (something like {date:'2001-01-01', amount:34000}),
> I'd like to have a view where the numeric values are scaled to a number.
>
> To scale the values I'need to know the maximum point,  and I think
> it'not possible to do that with map/reduce.

Can you write your reduce function to return the max and do client-side scaling?

Mime
View raw message