I'm on iOS.
On Friday, June 6, 2014 6:10:59 PM UTC-4, J. Chris Anderson wrote: > > > > On Tuesday, June 3, 2014 8:26:50 PM UTC-7, Seung Chan Lim wrote: >> >> Has anyone successfully used a filter with the _changes feed of local >> couchbase lite in the following fashion? >> >> > I don't rely on this in any of the apps I've written. It looks like it > should work based on the iOS implementation > <https://github.com/couchbase/couchbase-lite-ios/blob/master/Source/CBL_Router%2BHandlers.m#L592>. > > Are you on iOS or Android? > > >> >> http://lite.couchbase./db/_changes?feed=continuous&include_docs=true&filter=utils/by_id >> >> I'm on phonegap, and constantly getting a 404 error with the following >> document in place. >> >> { >> filters: { >> by_id: function(doc, req) { >> return true; >> }.toString() >> } >> ,views: { >> profiles: { >> map: function(doc) { >> if (doc.roles.indexOf('profile') != -1) { >> emit(doc._id, doc['first name']); >> } >> }.toString() >> } >> } >> } >> >> I've intentionally gutted out the filter function to just return true for >> the sake of testing the bare minimum. >> >> The views, by the way, works just fine. >> >> slim >> > -- 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/98d36d5b-780f-40f7-8853-31e92ccd1e88%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
