Get filtered data from Couchbase to sync it with local PouchDb

I have a website running on local PouchDb and i have some transaction docs on Couchbase server for different regions. I need to sync the transaction data to pouchdb from couchbase specific to the region that website belongs.
For e.g. my local website’s pouch db has data for region called USA and Couchbase server has data for multiple regions like USA, Germany, Europe etc. Then i just need to sync the data for USA from couchbase server to my local pouchdb.
Please help. how i can achieve this. Tried with import filter for sync gateway but no lock.
My sync gateway config looks like below -
{
“log”:[""],
“databases”: {
“transactions”: {
“server”: “http://localhost:8091”,
“bucket”: “exp_transactions”,
“username”: “xyz”,
“password”: “pass@123”,
“enable_shared_bucket_access”: true,
“import_docs”: true,
“num_index_replicas”: 0,
“import_filter”: function(doc) { if (doc.type != “transactions”) { return false } return true } ,
“users”: {
“GUEST”: {
“disabled”: false,
“admin_channels”: ["
"]
}
},
“num_index_replicas”: 0
}
},
“CORS”: {
“Origin”: [“http://127.0.0.1:8200”],
“LoginOrigin”: [“http://127.0.0.1:8200”],
“Headers”: [“Content-Type”],
“MaxAge”: 17280000
}
}

From my website page e.g. home.ts calling sync method of pouchdb
TRANSACTIONS.replicate.to(COUCHBASE_URL,{live:true}).then(data=>{
console.log(’----Replicated to Couchbase----’);
});
}

I can’t speak to the PouchDB side of things because that’s not a supported product from Couchbase. Our Sync Gateway REST API is compatible with CouchDB protocol which PouchDB supports but YMMV.

With that disclaimer, on your specific question - You should assign docs belonging to each region to region specific channels and then have the pouchDB client pull data specific to the channels. The documentation has examples on how to configure channels on Sync Gateway.
Don’t mess around with import filters for this case - that determines what data is available for mobile client replication in general.

Thanks for clarification, I used channels as suggested by you and it worked.