Rereduce and id

According to Custom Reduce Functions | Couchbase Docs

When rereduce is false:

  • The supplied key argument will be an array where the first argument is the
    key as emitted by the map function, and the id is the document ID that generated the key.
  • The values is an array of values where each element of the array matches the corresponding element within the array of keys.

Where is id ?? we have just key, values, rereduce arguments

function(key, values, rereduce) {
ā€¦

return retval;
}

Hi @socketman2016,

Iā€™m not exactly sure how to answer your question, but I opened up a ticket to look at updating the docs and possibly making it clearer: https://issues.couchbase.com/browse/DOC-4898

1 Like