couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Weber <scotty2...@sbcglobal.net>
Subject Re: Using filters
Date Wed, 29 Jan 2014 14:36:35 GMT
Cool.  Thanks.




----- Original Message -----
From: Alexander Shorin <kxepal@gmail.com>
To: "user@couchdb.apache.org" <user@couchdb.apache.org>
Cc: 
Sent: Tuesday, January 28, 2014 4:57 PM
Subject: Re: Using filters

Filter functions are applies on changes feed and are not accessible
for direct requests:
http://docs.couchdb.org/en/latest/api/database/changes.html#filtering
--
,,,^..^,,,


On Wed, Jan 29, 2014 at 2:53 AM, Scott Weber <scotty2541@sbcglobal.net> wrote:
> I am going through many of the tutorials for design docs, and trying various things.
>
> I saw that filters are used in replication, but it is correct that a "filter" cannot
get accessed via a URL, like other handlers?
>
>
> Given the design doc filter below:
> {
>    "_id": "_design/showme",
>    "_rev": "9-8d74f29a2890e402275a54f5b17997fd",
>    "filters": {
>        "useit": "function(doc, req){...}"
>    }
> }
>   (yes there is really a function provided, edited for content)
>
>
> And attempting to run the filter using this:
> http://localhost:5984/db/_design/showme/_filter/useit
>
> Returns the following:
> {"error":"not_found","reason":"missing handler: _filter"}
>
> This URL structure works for shows, views, lists which are all accessed through this
"handler".  Why the difference?
>
>
> -Scott
>


Mime
View raw message