we need to cleanup our database periodically as it grows and devices are becoming very slow. In order to achieve that we:
- Delete old documents on the server through Sync Gateway REST API
- Synchronise deleted revisions to the devices through pull replication
- Run compact on the local database
Apparently running compact on the local database does not purge deleted documents.
Is there a way to purge all deleted documents after pull replication through the Couchbase Lite API? We do not have the REST API setup on the devices.
The only way I can think about is to create a view and purge documents one by one.