On Apr 16, 2014, at 9:31 AM, Johnny Caveman <[email protected]> wrote:

> Let's say if after map process, the document's key is an date-type-color 
> array, and value is some concrete value need to be aggregated, how to write a 
> REDUCEBLOCK equivalent to _count, which allows you to drill down when 
> aggregating associated with groupLevel. Just like this.

Just write a trivial reduce block that counts rows. Setting the groupLevel will 
aggregate the keys together, and the reduce block will give you a count.
So if you set the groupLevel to 1, you'll get a row for each date whose value 
is the number of items with that date.

--Jens

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/941E5543-355B-4609-9197-97418888A210%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to