incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nils Breunese <N.Breun...@vpro.nl>
Subject RE: how to get documents by two or more keys?
Date Tue, 29 Mar 2011 06:25:06 GMT
Keys can be so called 'complex' keys. You could emit [username, tag] as the key for your view
entries and then request /_design/designname/_view/by_username_and_tag?key=["username","tag"]
to do the lookup.

Nils.
________________________________________
Van: bryan rasmussen [rasmussen.bryan@gmail.com]
Verzonden: dinsdag 29 maart 2011 8:03
Aan: user@couchdb.apache.org
Onderwerp: how to get documents by two or more keys?

As per the subject - most of my requests can be done with simple views
but I have some cases where I will want to return for multiple keys -
for example where I want to return documents for a username where
there is a particular tag value?

Thanks,
Bryan Rasmussen
------------------------------------------------------------------------
 VPRO   www.vpro.nl
------------------------------------------------------------------------

Mime
View raw message