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%5D

And 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

-- 
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/92ee9fb6-0330-4ff6-96bf-1922423599cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to