On Tuesday, July 21, 2015 at 3:07:43 AM UTC+8, Jens Alfke wrote:
>
>
> On Jul 20, 2015, at 11:43 AM, atom992 <[email protected] <javascript:>>
> wrote:
>
> Hi, I am using couchbaselite-phonegap-plugin 1.1 for android, and when I
> using REST api to get _changes with filter function and view function,it
> does't work. does this mean that parameter isn’t implemented.?
>
>
> Yes, that’s what I said above: the “view=” query parameter isn’t supported.
>
>
Is there a roadmap to supported view query parameter?
>
> If I use filter=XXX in the _changes request, it return 404,but when I use
> filters=XXX It return all docs.
>
>
> “filters=XXX” will just be ignored because that’s not a known query
> parameter.
>
> In the REST API you put filter functions in design documents as JS code —
>> specifying “filter=ddoc/foo” will look for a design document named
>> “_design/ddoc”, find a dictionary property named “filters" in it, and look
>> for a string property named “foo” in that.
>
>
yes I have a filter like this:
{
"filters": {
"ff": "function (doc, req) {\\\\\\\n if(doc.type
== \"TYPE1\"){\\\\\\\n return true;\\\\\\\n
}\\\\\\\n return false;\\\\\\\n
}"
},
"_rev": "1-36cfb89647b0162d1b8e4b504675ce46",
"_id": "_design/app"
}
and when I get _changes with filter=app/ff , I got 404. My request is like
this:
GET /cbldb/_changes?filter=app/ff HTTP/1.1
and response is like this :
{"status":404}
>
> —Jens
>
--
You received this message because you are subscribed to the Google Groups
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/mobile-couchbase/30c9d275-d115-4754-90cc-3ba5ef42510e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.