You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by David Stuebe <DS...@asascience.com> on 2011/11/11 20:29:36 UTC

replication of documents in a view


Hi CouchDB

I am interested in moving data between databases subject to the
constraints of a view. Is there a way to do this through the replication
interface or would I have to implement that at that at my application
level?

It would be great if I could add that to the replication request:

POST /_replicate HTTP/1.1
{"source":"database","target":"http://example.org/database","view":/blog/_d
esign/docs/_view/datatoreplicate?key="mykey"} -H "Content-Type:
application/json"


And that would take only the documents specified by the datatoreplicate
view on the source and replicate them  to the target.

Would be really cool if you could set this kind of thing up in continuous
mode...

Thanks

David


Re: replication of documents in a view

Posted by Dave Cottlehuber <da...@muse.net.nz>.
On Friday, 11 November 2011, David Stuebe <DS...@asascience.com> wrote:
>
>
> Hi CouchDB
>
> I am interested in moving data between databases subject to the
> constraints of a view. Is there a way to do this through the replication
> interface or would I have to implement that at that at my application
> level?
>
> It would be great if I could add that to the replication request:
>
> POST /_replicate HTTP/1.1
> {"source":"database","target":"http://example.org/database
","view":/blog/_d
> esign/docs/_view/datatoreplicate?key="mykey"} -H "Content-Type:
> application/json"
>
>
> And that would take only the documents specified by the datatoreplicate
> view on the source and replicate them  to the target.
>
> Would be really cool if you could set this kind of thing up in continuous
> mode...
>
> Thanks
>
> David
>
>

I think if you take a look at filtered replication or validation docs you
should be able to achieve the same result. Filipe's done a great summary on
the new replicator - gist.github/fdmanana

a+
dave