I use PHP SDK to get documents from a design view, and delete them.
$myCluster = new CouchbaseCluster('couchbase://127.0.0.1');
$myBucket = $myCluster->openBucket($bucketName);
$query = CouchbaseViewQuery::from('dev_view', 'old_docs');
$res = $myBucket->query($query);
foreach ($res['rows'] as $doc)
$res = $myBucket->remove($doc['key']);
All the docs from the view are deleted from Couchbase server, but Couchbase doesn't notify Sync Gateway to delete them from devices. When I start the App on any device (Android tablets) the documents start to sync back to Couchbase server instead of being deleted from the device. But when I delete a document from device, Sync Gateway notifies the CB server and document is deleted from CB server too.
Is there any bug with PHP SDK? Should I call a function to notify Sync Gateway after deleting documents?