incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Woodward <>
Subject Re: Map/Reduce Question
Date Thu, 02 Dec 2010 19:50:18 GMT
On Thu, Dec 2, 2010 at 11:28 AM, Adam Kocoloski <> wrote:

> You need to perform the query with ?group=true.  Best,

Thanks! Closer, but now I'm only getting one result per key which isn't
quite what I need.

When I added group=true I now get:

In and of itself that's fine. The issue is that there are records within
each key1 that have a *different* value that aren't getting included.

So what I'm hoping to see is something like this:
{"key":"key1","value":["it is","sunny"]},
{"key":"key2","value":["it is","raining"]},

In other words it's currently only showing one record per key, even if there
are records within each key with different values. Now if there is a record
with a different key but the same value (which is why I used "hi","there" in
the example for all the keys), then it *should* be included, and that is
currently working. The only part that isn't working is it isn't including
multiple distinct values for each key.

Thanks so much for the input thus far--very helpful as I learn CouchDB.

Matthew Woodward / Twitter: @mpwoodward

Please do not send me proprietary file formats such as Word, PowerPoint,
etc. as attachments.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message