I am integrating XDCR via JAVA Sdk. If I need to setup filter expression per collection mapping rule how to do in java? say collection mapping rule 1 has one filter expression, collection mapping rule 2 has some other filter expression and so on.
Asked
Active
Viewed 56 times
1
-
The Couchbase Java SDK does not have an API for managing XDCR. One option is to use the [SDK's HTTP client](https://github.com/couchbase/couchbase-jvm-clients/blob/d88c840977d6f8d67fc1dc5bec5a7510341aa82c/java-client/src/main/java/com/couchbase/client/java/http/CouchbaseHttpClient.java#L25-L63) to invoke the [XDCR HTTP API](https://docs.couchbase.com/server/current/rest-api/rest-xdcr-intro.html) yourself. – dnault Dec 20 '22 at 23:39
-
Thanks for reply. with XDCR HTTP API if we have collection mapping rules can we add filter expression per collection mapping rule ? if yes what will be the sample code. say if sourcecollection11->targetcollection1 should be replicated with filter expression 1. sourcecollection2->targetcollection2 should be replicated with filter expression 2 and so one – user2425109 Dec 21 '22 at 07:58
1 Answers
0
You can use the REST API to configure collection mappings: https://docs.couchbase.com/server/current/rest-api/rest-xdcr-adv-settings.html (look for calMappingRules
)

Perry Krug
- 665
- 4
- 6