couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregor Martynus <gre...@martynus.net>
Subject replicate A => B, but only docs that exist in B
Date Sun, 06 Nov 2011 13:14:40 GMT
*SCENARIO*:

Each user has its own DB ("B") of documents which replicates continuously
to a center DB ("A") which contains all documents from all users. That
works perfectly fine so far.

What I'd like to add now are "shared documents", which can be updated from
others in the center DB ("A"). This changes should be replicated back to
the owners DB ("B").

Hope that makes sense so far?


*IDEA*:

What I'd love to have would be as simple way where I could start a
continuous replication "A" => "B" which only replicates the docs that do
already exist in "B". Is there something like this?

I though about making a filtered replication "A" => "B" where the filter
checks if the document exists in "B", but as far as I understand it, the
filter only has access to the doc from "A", not from "B", right?


*NOTE*:

I know I could use a filter that checks for some kind of `owner_id` in the
documents, but each document has child elements which I want to keep
atomic, and I do not want to add an `owner_id` attribute to all of these.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message