开发者

Filtered change notification on views

I need to replicate, in a new database, the result of a view. Is there a solution other than using an external process waiting for changes?

Below a broken example of what i need: a continuos filtered replica using a reduced开发者_C百科 view as source:

curl -H "Content-Type: application/json" -X POST -d \
'{"source":"http://localhost:5984/datastream/_design/dbname/_view/viewname?group=true&group_level=3", \
"target":"http://localhost:5984/dbreplica", "filter":"dbname/filtername", \
"query_params": {"key":"value"}, "continuous":true}' http://localhost:5984/_replicate


CouchDB supports replicating from one database to another. It is not possible to replicate or copy a view to a database.

However BigCouch, custom couchdb build made by Cloudant with built-in clustering capability, has a feature called chained-map-reduce views. It allows the rows from a map-reduce view to be copied to another database. This is exactly what you are trying to do.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜