incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Davis <paul.joseph.da...@gmail.com>
Subject Re: reducing values and deltas -- order of reduce args
Date Wed, 10 Jun 2009 19:42:12 GMT
On Wed, Jun 10, 2009 at 3:33 PM, Wojciech
Kaczmarek<kaczmarek.w@gmail.com> wrote:
> Hi!
> I have several applications of a schema where I'd store a timeline of
> values and/or deltas of these values. The basic view should return
> accumulated value at the given moment of time. I'm thinking about
> calculating the values (ie accumulating the deltas) via reduce, but it
> depends on the fact that values passed to reduce are in the order of
> how they were emitted. Can we rely on this order?
>
> cheers
> Wojtek
>

Not very simply. There's a Top N tags example on the view snippets
page that shows part of the idea on handling reduces and relying on
the inputs to the first reduce stage being sorted. Though for deltas
you'd have to figure out how to apply partial deltas and other nasty
bits.

Paul Davis

Mime
View raw message