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: One view per "query"?
Date Fri, 10 Jun 2011 19:37:16 GMT
The query arguments are startkey and endkey, not startKey and endKey.

You might want to just use key= in this case though.

http://wiki.apache.org/couchdb/HTTP_view_API#Querying_Options

Nils.
________________________________________
Van: Peter Nolan [peterwnolan@gmail.com]
Verzonden: vrijdag 10 juni 2011 17:27
Aan: user@couchdb.apache.org
Onderwerp: Re: One view per "query"?

you can create a view called byArtist whose code looks like the following.

function (doc) {

     if (doc.artist) {
         emit(doc.artist,otherStuffYouWantToKnow)
     }

}

then you can query this view with startKey='dylan' and endKey='dylan'
and receive those docs that only have the field of artist set to 'dylan'.

------------------------------------------------------------------------
 VPRO   www.vpro.nl
------------------------------------------------------------------------

Mime
View raw message