On Nov 22, 2015, at 11:41 AM, 
[email protected]<mailto:[email protected]> wrote:

And afterwards deleting every single document using the following request for 
each one:
http://developer.couchbase.com/documentation/mobile/1.1.0/develop/references/sync-gateway/rest-api/document/delete---db---doc-/index.html

Deleting a replicated doc adds a new ‘tombstone’ revision that marks the 
deletion. You don’t want that. (In a nutshell, this tombstone will be newer 
than your old revision you’re restoring, so it takes precedence over it.)

What you want to do is purge the server-side doc; this literally deletes it and 
all its revisions from storage, causing the server to forget about it 
completely. The problem is that Sync Gateway currently doesn’t implement the 
_purge call, and even if it did, it would be a privileged call (part of the 
admin-only API) not something a client could use.
What you’ll need to do is implement a bit of app-server code that can respond 
to an (authorized) request  to purge a user’s docs, and will use a Couchbase 
Server ‘Delete' call to erase the document from the bucket, which is pretty 
much equivalent to a purge.

—Jens

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/CFED6CD6-626B-4DAE-8B3D-33E45060A680%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to