I want to retreive the current rev value of my objects via N1QL

Hi, I need to fetch a lot of documents ids to send them to a microservice that updates said document with SG _bulk_update. To do this I need to include their rev field, but I cannot seems to be able to retreive it using N1QL.

I’m doing:
SELECT docId, META(bucket)._sync.rev FROM bucket

The other part of the query is not important since this is what is giving me trouble right now. Could please anyone help me with this?

_sync is not part of the regular document Meta data. So it is not supported directly. You can checkout N1ql + sync gateway

1 Like