Is there any way to update the sync gateway configuration to restrict the replication for last 7 days? I just want to replicate the documents for last 7 days to improve the performance of the app.
My current sync config is as follows:
"interface": ":4984",
"profileInterface": "80",
"adminInterface": ":4985",
"MaxFileDescriptors": 25000,
"log": [
"CRUD",
"CRUD+",
"HTTP",
"HTTP+",
"Access",
"Cache",
"Shadow",
"Shadow+",
"Changes",
"Changes+"
],
"databases": {
"db1": {
"username": "${CB_USER}",
"password": "${CB_PASS}",
"bucket": "bucket1",
"server": "http://db:8091",
"revs_limit": 100,
"changes_feed_limit": 200,
"enable_shared_bucket_access": true,
"import_docs": "continuous",
"sync": `
function(doc, oldDoc) {
if(doc.type === "type2"||doc.type === "type1") {
channel("public");
} else {
channel(doc.members);
}
}`,
"users": {
"GUEST": { "disabled": false, "admin_channels": ["*"] }
}
}
}
}```