Sync gateway pulling issue

@zeeshan_niazi

Here is the section from the developer portal

If you don’t supply a sync function, Sync Gateway uses the following default sync function:

function (doc) {
   channel(doc.channels);
}

In plain English: by default, a document will be assigned to the channels listed in its channels property (whose value must be a string or an array of strings.) More subtly, since there is no validation, any user can change any document. For this reason, the default sync function is really only useful for experimentation and development.

so you can use

"channels":"mychannel",

or

"channels":["mychan1","mychan2","mychanN"],

In both cases documents should appear in a pull sync on the client. The channel names are not significant in this case  as the OB user has "admin_channels" set to "*". 

In more complex scenarios you can give different users access to different channels and map documents to a subset of those channels, allowing you to partition the data between users.

Andy