获取本地存储中已删除的文档

Get deleted documents in local storage

我在 CouchDB 1.6 上使用 CouchBase Lite 1.4 Android 我想列出本地数据库中的所有 _deleted 文档 一旦我得到所有我想清除它 所以

Map<String, Object> deleted  = null;

            Database master = CouchbaseManager.getInstance().getMasterDataBase();
            QueryOptions queryOptions =  new QueryOptions();
            queryOptions.setStartKey("_deleted");
            queryOptions.setEndKey("_deleted");

            try {
                deleted =  master.getAllDocs(queryOptions);
            } catch (CouchbaseLiteException e) {
                e.printStackTrace();
            }
            Log.i("deleted", "we have " + deleted.size());

使用此代码我什么也得不到。 我做错了什么?

不能只查询删除的文档,而是可以查询所有包含删除文档的文档,然后用document.isDeleted()过滤。

how to query with included deleted doc