couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jens Alfke <>
Subject Re: map reduca with object as key
Date Wed, 17 Aug 2011 16:40:01 GMT

On Aug 17, 2011, at 12:09 AM, Heiko Henning wrote:

Is there a possibility to have key as Object?

Or have i to do thinks like:

emit(doc.lom_id+'___'+user:doc.user, doc.value);
emit(doc.lom_id+'___all', doc.value);

Usually people use arrays, not objects, as composite keys. Keys are sorted, after all, and
it’s kind of unclear how to sort objects since the key-value pairs have no intrinsic order.

So try something like emit([doc.lom_id, user:doc.user], doc.value);


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