You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Alexander Shorin <kx...@gmail.com> on 2014/01/28 23:57:23 UTC
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 <sc...@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
>
Re: Using filters
Posted by Scott Weber <sc...@sbcglobal.net>.
Cool. Thanks.
----- Original Message -----
From: Alexander Shorin <kx...@gmail.com>
To: "user@couchdb.apache.org" <us...@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 <sc...@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
>