1
votes

I have an issue of replication and I need your help in it.In couchDb replication,I want to replicate in such a way that during Couchdb replication I want to reset/update some specific attributes of a a document for some purpose and then these edited documents should be saved in replicated db without effecting the original ones.For example: A document named Student with attributes id,name,class etc. And I want to replicate this document in the way that its name and class should be reset/updated. Will you please tell me how can I achieve it. Thanks.

1

1 Answers

0
votes

You can't update docs during the replication.

But you can exclude docs from being replicated with the help of a CouchDB filter (e.g. preventing all docs with a revision higher then 1 from being replicated).

If you want to have multiple versions of the same dataset (e.g. to have dataset revisions) - i use the term "dataset" instead of "doc" to clearly express that not the internal CouchDB doc revision handling is involved - you have to store them as separated docs that have all a unique id and a reference property like original: "UUID_of_the_original".

you can't use the CouchDB doc revision handling for that purpose (thats what many people think when they see the _rev property in the docs)