First time I'm playing with rereduce and stumped a bit. I got emits like this:

    ("a", "one")
    ("a", "two")
    ("a", "one")
    ("a", "one")
    ("b", "three")
    ("b", "three")

What I would like to get at the end of the reduce is this:

    { key: "a", value: [ "one", "two" ] }
    { key: "b", value: [ "three" ] }

I could implement a really simple reduce like this:

    reduce(k, v) { return v }

and then unique on the client side.

Other option is to emit(["a", "one"], 1), reduce to sum and then use
startkey/endkey to walk through the unique keys.

Is there a better way?

Thanks,

K.

Reply via email to