I need to replicate selected records from couchdb to pouchdb,
how to create filter in couchdb and use it in pouchdb ?
I am using Ionic.
Thanks
Manage to resolve it, was making very stupid mistake.
here is how document will look like in cloudant
{
"_id": "_design/agentapp",
"_rev": "2-ede711dde1923`enter code here`1092dd7bebc4c22811d",
"filters": {
"by_agent": "function(doc, req) { return doc.agent === req.query.agent;}"
}
}
working curl request https://host/database/_changes?filter=agentapp/by_agent&agent=1
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.