incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Avi Flax" <>
Subject How to use View URL Query Parameters?
Date Sun, 20 Jul 2008 20:24:22 GMT
Specifically, I don't understand how to use "key".

Let's say I want to get all Comment documents which are tagged with "doofus".

I figured I'd create a "views" key in a design doc that looked
something like this:

       "map": "function(doc) { if (doc.tags.indexOf(key) != -1)
emit(null, doc) }"

and then GET this URL:

But it's returning 0 rows. I know I must be missing something here.

Apologize if this is a FAQ or is just so obvious it doesn't even need
to be. I think perhaps I need to take a break from the computer for a
couple of hours.


Avi Flax » Lead Technologist » Partner » Arc90 »
View raw message