Can sync gateway channels be used in Couchbase server

  • To clarify, the recommendation applied more to pre SG 1.5/ CBS 5.0 . With SG 1.5 / CBS 5.0 (which is what you are presumably using), you don’t need to go through SG always . SG imports documents in CBS via DCP even if it is uploaded via web app and adds appropriate sync metadata in the document XAttr. The imported documents are processed via the sync function. These documents are available to mobile clients.
    So you shouldn’t have to re implement the sync function’s permissions rules within your web service for documents that are uploaded from within the web app. The sync gateway should take care of it.
  • We don’t have a good way to implement time series data although this has come up before. We have a GitHub issue to track this. If you can add specifics on what you would like , this will greatly help with prioritization of this issue. Until that feature is available, you can use the approach you described - have a channel associated with date and filter on that. Maybe if its just the last 7 days, you can have some process running daily on your server that moves all the old documents manually an "history " channel.

But we don’t have a way to query metadata via N1QL in 5.0 other than the _raw API on the Sync Gateway.
@atom_yang : Have you filed a GitHub ticket requesting this capability for future versions?