Couchbase Server + Sync Gateway

There shouldn’t be any problem using N1QL to query the bucket, as long as you’re not using any of N1QL’s write capabilities. The other caveat is that Sync Gateway adds an _sync property to each document it writes, to manage the metadata used by Sync Gateway for replication and security - you may need to account for this in your query design.