couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Davis <>
Subject Re: New to couchdb, question about dynamic view?
Date Wed, 15 Apr 2009 17:24:24 GMT

You'll want something like:

    "_id": "_design/foo",
    "views": {
        "bar": "function(doc) {if(doc.attribute) emit(doc.attribute, null);}"

After saving that you can use a URL like:

And you'll get the list of docs that have that attribute.

Paul Davis

On Wed, Apr 15, 2009 at 1:15 PM, Jason Tahaney
<> wrote:
> Hello,
> Very new to couchdb.  Can someone please tell me how I would represent a
> search for an attribute value (say from user input) in a design view?  Are
> design views static (everything I read points to yes)?  I'm probably trying
> to use the wrong feature.  Just looking for a way to say search where
> attribute=value and value comes from user input.
> Thanks,
> Jason

View raw message