I'm trying to setup a filtered replication in CouchDb:
The filter I use is the following:
function(doc, req){
if(doc._id == req.query.myid){
return true;
}
return false;
}
To test the filter I make this call:
GET /people/_changes?filter=data/mobile&query_params={"myid": "1"}
- The name of the database is "people"
- The design document with the filter is "_design/data"
- And the name of the filter is "mobile"
And I get this as result:
{"results":[
],
"last_seq":126}
when I had to get the document with id equals to "1".
Can anyone tell me where I'm wrong?