I am using Couchbase Lite .NET running on Xamarin.Android to retrieve
documents from a server with the user's name in the channels list:
{
"_id": "normalDoc",
... some data here...
"channels": [
"user1"
]
}
This works just fine. What I'd like to do is create a "priority" channel
specifically for documents I want to retrieve ASAP:
{
"_id": "priorityDoc",
... some data here...
"channels": [
"user1",
"priority"
]
}
I specifically do not want to give the user access to the entire "priority"
channel because I only want them to see ones assigned to them. I figured I
could retrieve this through a one-shot replication that runs immediately:
Replication _priorityReplication = _database.CreatePullReplication(uri);
_priorityReplication.Channels = new List<string> { "priority" };
_priorityReplication.Start();
This replication does not pull anything. If I add the user to the channel
list, then it pulls everything for that user, priority or not.
My hope was that with only the "priority" channel, the sync gateway would
sync the intersection of the two channels, everything in "priority" that
the user has access to from their own channel as well. I would prefer not
to create filters that need to be re-created every time I re-deploy the
server, and I would also prefer to use as few magic channel names as
possible, for simplicity's sake. Am I mistaken about how Replications and
the Sync Gateway handle channels, and am I out of luck regarding
filters/magic-named channels
--
You received this message because you are subscribed to the Google Groups
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/mobile-couchbase/cf72aeba-41b5-46e8-81ec-21719e1f290b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.