I think you're the only one who knows how to answer this. Would love your help.
(This is off of the other thread titled "J. Chris Anderson can you help? Re: filtering changes feed")
--------
Hi, I'm just getting around this. (went on a vacation)
So I see that now a dummy filter function that returns true works great.
I'm still having trouble making my filter function work, and I'm guessing it has to do with the remark you made about decodeURIComponent and JSON.parse.
I tried throw JSON.stringify(req) as you suggested, but I'm not seeing it show up anywhere. Where does it show up? I have my safari developer console open which I use to debug my phonegap app.
Since I call it like this
http://lite.couchbase./status32/_changes?feed=continuous&include_docs=true&filter=utils/by_id&doc_ids=%4B%22id%22%5DAnd my filter function looks like this
function(doc, req) {
if (req.query.doc_ids.indexOf(doc._id) != -1) {
return true;
} else {
return false;
}
}
Are you saying I should:
var doc_ids = JSON.parse(decodeURIComponent(requ.query.doc_ids));
if (doc_ids.indexOf(doc._id) != -1) {
return true;
}
Am I understanding you?
slim