incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Candler <B.Cand...@pobox.com>
Subject Re: different results for same group levels
Date Thu, 08 Oct 2009 15:21:23 GMT
On Wed, Oct 07, 2009 at 10:15:38PM -0500, Francisco Viramontes wrote:
> Is there a view I can make that handle conditional key emiting or  
> something that I can pass a parameter to?

No, views cannot take parameters. This is because they are built up-front,
and updated incrementally thereafter. That is, the view exists independently
of the queries which are subsequently made against it.

One option is to have a view which outputs keys in whatever the smallest
range is you want to support, say 1 minute buckets. Then you can combine
them into N-minute buckets client-side, or inside a _list function.

Mime
View raw message