Can I put a specific document in a channel without using sync function?

Is there a way to put a specific document in a channel? I don’t want to use the sync function because this is just for one specific document. Basically I have a “demo” channel for documents that will be used in demos and tutorials, and I want to use normal document types but put specific documents by id in my demo channel. The documents could be updated so I want to do this the official sync gateway way (if there is one), rather than changing the doc metadata manually in couchbase server.

I can’t think of a way to channel a doc without either using the sync function, or (as you mention), hacking the doc metadata directly.

I suppose the cleanest approach would be to modify your sync function to catch demo docs at the top of your sync function (based on a unique property in the demo docs), channel them to demo and immediately return, in order to avoid your normal doc type processing.

Thanks for the info. I ended up modifying the sync function to treat demo documents differently, and just added a demo flag to the documents to mark them as demo ones.