couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobi Schäfer <>
Subject Re: Newbie question: How to collate sum() with other properties
Date Sat, 07 Jan 2012 22:22:11 GMT
thanks for your suggestion, zach!

i am delighted to hear that issuing two requests is not despised.

nevertheless, just for the sake of fully understanding map/reduce in couchdb, i read your
reply as although it might be a mess of code and counter-intuitive it is possible and it would
work… is that correct?

best regards,

On 06.01.2012, at 18:57, Zachary Zolton wrote:

> Tobi,
> You probably can somehow cram all that stuff together via the reduce
> function, but you miss out on being able to use the built in _count
> reduction and it'll take a mess of code.
> I think you're better off trying to retrieve this information in two
> queries: first query for the names and IDs of the polls and then do a
> second query for the count of choices of those poll IDs.
> Cheers,
> Zach

View raw message