> On Nov 10, 2017, at 5:19 AM,
parvez....@decurtis.com wrote:
>
> Even after specifying groupLevel as 3, I always receive four elements in each row of keys array of reduce block. Also If I specify startKey / endKey then query do not return any result (reduce block is not executed) but if I omit startKey / endKey then I am able to get results in reduce function. I have made sure that couchbase is having records corresponding to values specified in startKey/EndKey but still then it do not works. I am using Couchbase lite 1.3.1 (build 6) with iOS Swift 3.0.
>
> How this issue cab be troubleshooted?
Thinking further … the group-level shouldn’t affect the calls to the reduce function, so that part is behaving correctly. (In CouchDB, reducing happens when the index is built, not at query time at all; CBL can’t perform that optimization, but it still follows the same semantics of the reduce function.)
The part about startKey/endKey might be a bug, though. You can file an issue, but please provide detailed information such as the contents of the documents, and the exact parameters of the query.
Are you actually getting incorrect results from the query? If so, what did you expect and what did you get?
—Jens