CURRENT VERSIONS
Couchbase Lite 1.4.4
Couchbase Server CE 6.0
Sync Gateway 15.2
Summary
Added new read channel to a document type, but unable to pull those documents using the new channel
Currently, I have a document type (known as “oiq”) that is set to 3 pre-existing channels. (e.g. “root”, branch, branch/2017)
I want to add both pre-existing oiq documents and future oiq documents to a new 4th channel (e.g. branch/oiq). Hence, I made the edits on my server using a servlet call, but the documents aren’t being pulled despite changing the channels on the app side. (e.g. Arrays.asList(“branch/oiq”); )
Alternatively, I tried renaming one of the old read channels to something else (e.g. branch/2017 to branch/000), but I was unable to pull those documents using the new channel of branch/000 too. Strangely enough, branch/2017 still works despite the renaming.
Am I missing a vital process here to get things working?
I have bucket shadowing enabled so I’m not sure if this is a side effect from that.
This is my sync gateway config file.
“databases”:
{
“branchdb”:
{
“server”: “”,
“bucket”: “branchdb_sg”,
“username”: “”,
“password”: “”,
“users”: { “GUEST”: {“disabled”: false, “admin_channels”: ["*"] } },
“shadow”: { “server”: “”, “bucket”: “branchdb”, “username”: “”, “password”: “” },
“sync”:
`
function(doc, oldDoc)
{
// Check document write access
requireAccess(doc.m_w);if(oldDoc) requireAccess(oldDoc.m_w); // Set document read channels channel(doc.m_r); } ` }
}