Couch docs with temporary ID - '_sync:rev:xxx'

When syncing a doc to couchbase through SyncGateway, the doc possesses a temporary ID, starting with ‘_sync:rev:’. On some very data-intensive usages, this is what been receiving everytime while retrieving the doc through View function. This prevents the doc to be retrieved from couchbase. Let me know if there’s any fix for it.

The doc itself doesn’t get a temporary ID - the doc is stored using the regular doc ID, and you can obtain that document from the server as usual.

What you’re seeing with the _sync:rev: prefix is an additional doc that gets created - a temporary backup of the previous revision body, required for other clients that have an in-flight replication.

If you’re querying a bucket owned by Sync Gateway, your map functions or N1QL queries must ignore any documents whose keys start with _sync:. Those are internal data created by Sync Gateway.