2

I have this info about my datable:

{"db_name":"my_table","doc_count":386321,"doc_del_count":112331,"update_seq":3585223,"purge_seq":0,"compact_running":false,"disk_size":10083242115,"data_size":1029825313,"instance_start_time":"1533006878496574","disk_format_version":6,"committed_update_seq":3585328}

About that Json I have been reading on CouchDB site that:

  1. doc_count (number) – A count of the documents in the specified database.
  2. doc_del_count (number) – Number of deleted documents

I am logging the replication itself and using getCompletedChangesCount() method over a replicator I getting always more than doc_count number , so my question is .
Does the replication process replicate the doc_del_count ? In afirmative case? Why? Can I skip those doc_del_count in the replication process? How?

JoCuTo
  • 2,463
  • 4
  • 28
  • 44

1 Answers1

0

I think this was mostly answered in this related SO post. The short version is you need to track deleted documents, so the count gets added in.

Normally deleted documents have all properties removed, so the overhead is very small. You can use a deleted document as a kind of archive with a set of properties, although that must be done explicitly.

Hod
  • 2,236
  • 1
  • 14
  • 22
  • Thanks @Hod , just one question how Can I avoid to download those documents in the replication process, filter with if (doc._deleted === true) return false; does not work in case – JoCuTo Jul 19 '17 at 06:31
  • Currently I think not all filtering works with CouchDB. See if this helps (you may want to look at the connected Github issue): https://developer.couchbase.com/documentation/mobile/current/guides/couchbase-lite/native-api/replication/index.html#filtered-pull-from-couchdb-pouchdb-or-cloudant – Hod Jul 19 '17 at 23:31