My Couchbase (CB) model represents multiple companies, each with multiple users. The companies typically have 10k-100k documents each. All docs are in one bucket.
I have both a web app and a mobile app. Web app talks through Couchbase Sync Gateway (CSG) using the RESTful API and mobile makes use of Couchbase Lite, so also talks through CSG. Only changes that might bypass CSG is those made using CB’s admin console but they are few.
Given the large amount of documents in CB, I do not want it all “tracked” in CSG. Setting “enable_shared_bucket_access=true” and “import_docs=true” replicates all CB docs in CSG which is unnecessary. A lot of the documents will not change that often, if ever so it feels like a waste to keep them from bogging the CSG’s hardware resources.
Now I’ve read a little about “import filters” so I guess there might be a way to filter imports on some datetime field or so but I will then still have the use case of the new mobile user who expects all his/her company data to be on the mobile device when he/she signs up. Meaning my mobile app would then not be able to sync from only the CSG but I will also have to then manually pull from CB the docs not covered by the configured CSG’s datetime import filter.
- CB Server = v6
- CSG = v2.6.1
With that background, a couple of questions:
- Various forum examples mention “import_docs=continuous” and it seems to work, yet the current documentation (https://docs.couchbase.com/sync-gateway/2.6/config-properties.html) indicates it is a boolean with only true/false. Where can I find the documentation explaining the “continuous” import_docs setting?
- What is the recommended approach for handling sync with CSG when your CB server has got millions of documents, some of which might not change often?