Can you post an example?
If you set the groupLevel to 1, all the rows with the same color (first item of key) will be grouped together, and the reduce function will be called on them to generate a single value. The resulting row in the output will have key equal to [color] and value being the reduce output.
If you set the groupLevel to 2, the rows with the same first two items in the key are grouped together.
In Couchbase Lite, the number of calls to the reduce function will be the same as the number of groups in the result. But you shouldn’t count on this. CouchDB would call it more often on smaller numbers of rows, and Couchbase Lite may do that in the future as a memory optimization.
—Jens
(By the way, which platform are we talking about here, iOS or Android?)