couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Kuijsten <i...@netsend.nl>
Subject replication with document transformation
Date Tue, 24 Apr 2012 19:39:47 GMT
I'm currently replicating with filters, this works great to share 
certain documents between multiple systems based on their attributes. 
The thing is, I'd like to map certain names to a locally used name.

Example: we have 2 systems that want to share some documents with each 
other, based on a certain value for the "company" attribute.

The owners of database 1 want to share all documents that have 
"company": "Webstore Chicago" with the owners of database 2. All fine 
with a filter, but the owners of database 2 like to refer to "Webstore 
Chicago" as "Webstore 501". Is there a way to somehow transform the 
document while it's being replicated by the filter so in 1 database it's 
represented as "Webstore Chicago" and in the other db this same doc has 
"Webstore 501"?

Maybe if I could replicate the results of a view instead of the direct 
docs or something..

Regards,

Tim

Mime
View raw message