I am making an application using Ionic framework We are using Couchdb and pouchdb but when we do couchdb to pouchdb sync All the documents in Couchdb are replicating to every pouchdb user I am stucked please help me
Asked
Active
Viewed 1,180 times
2 Answers
0
You need to create a filtered function to replicate only documents you need.
Here the documentation from pouchdb: http://pouchdb.com/2015/04/05/filtered-replication.html
Usually for this case I create one database per user in couchdb and I replicate pouchdb only with the couchdb user database. So you don't have to deal with filtered function on pouchDB.
You will use filtered function to replicate couchdb user database to a master couchdb database.
Here the documentation for couchDB replication with filtering function: https://wiki.apache.org/couchdb/Replication#Filtered_Replication

fabballe
- 761
- 4
- 12