How to use sub document API in Couch base lite and sync gateway

Hi Team,

I have read that sub document API (https://developer.couchbase.com/documentation/server/current/developer-guide/sub-doc-api.html) can reduce network traffic up to 99 percent.

But didnt found this for couchbase lite/sync gateway.

Is it available?

If not do we have a roadmap to use it for mobile?

Regards
Pankaj Sharma

1 Like

Couchbase Mobile synchronizes entire documents, so that the client can work offline. Subdocuments in Couchbase Server are for interactive uses where the app server only needs to read a small part of a document at that moment.

Do you have a specific idea of what you’d want to use subdocuments for?

I thought it would be very efficient if we can transfer only the values which have changed and not the entire document.

One more question is GZip use by default or we need to turn on something? Is Gzip applicable for all the document sizes?