Search code examples
androidcouchdbcouchbaseektorp

Android - Couchbase attachments storage and selective pull replication


I had the following 2 questions on couchbase on android:

  • When the couchdb is replicated to the android device, are the attachments in the document downloaded and saved to the SDCard or only the plain document(json) is saved?
  • is it possible to perform selective replication. Basically if a couchdb contains a chunk of documents, Can I replicate only a subset of the documents? I am using the Ektorp Client library.

Update : For the second question the answer by "I dropped out of a java school" is good. The right term is Filtered Replication.

I'm looking for an answer for the first question with evidence.


Solution

  • Attachments are fully transferred during replication

    You can filter the replication based on the contents of the document with a filter function, you can find more info - http://wiki.apache.org/couchdb/Replication#Filtered_Replication

    You cannot replication 'parts' of a document, its all or nothing with the replicator