view function on _changes

27 views
Skip to first unread message

Seung Chan Lim

unread,
Jul 29, 2014, 4:53:10 PM7/29/14
to mobile-c...@googlegroups.com
I noticed here:

http://developer.couchbase.com/mobile/develop/references/couchbase-lite/rest-api/database/get-changes/index.html

that there's a parameter "view" that is supported as part of _changes.

1. What's a right value for it? If the design doc is "_design/utils" and the view function is "by_id" should the value be "utils/by_id" ?

2. How does this work?

Does it call the "map" function of a given view?

3. Can I pass it parameters? If so, how?

If I wanted it to filter the changes by id, could I somehow pass it a list of ids to filter for (i.e. ["id1", "id2"] will only monitor changes for those documents with those ids)

If it's just a map function, then where do I get access to such parameters?

Jens Alfke

unread,
Jul 29, 2014, 6:53:42 PM7/29/14
to mobile-c...@googlegroups.com

On Jul 29, 2014, at 1:53 PM, Seung Chan Lim <djs...@gmail.com> wrote:

I noticed here:
http://developer.couchbase.com/mobile/develop/references/couchbase-lite/rest-api/database/get-changes/index.html
that there's a parameter "view" that is supported as part of _changes.

Huh. I think this web page is just copied from the CouchDB API docs; Couchbase Lite and the Sync Gateway don’t support the ‘view’ option, nor a lot of the other options like “last-event-id” or “att_encoding_info”. Sorry about that. We should make sure that the docs correspond to reality. :(

—Jens
Reply all
Reply to author
Forward
0 new messages