GitHub PullRequestReviewCommentEvent at 2014-03-07 15:25:29
Repository: sync-android
Actor: dongshengbc
Payload: {"comment":{"url":"https://api.github.com/repos/cloudant/sync-android/pulls/comments/10386197","id":10386197,"diff_hunk":"@@ -186,3 +212,40 @@ if (replicator.getState() != Replicator.State.COMPLETE) {\n indexManager.updateAllIndexes();\n \n ```\n+\n+### Filtered pull replication\n+\n+_Only abailable in version 0.3.3 and up_\n+\n+[Filtered replication][1] is only supported for pull replication. It requies a \n+\"Filter\" object is added to \"PullReplicatoin\" to describe the \n+\"Filter Function\" that is used and is query parameters. \n+\n+```java\n+import com.cloudant.sync.replication.ReplicationFactory;\n+import com.cloudant.sync.replication.Replicator;\n+import com.cloudant.sync.replication.PullReplication;\n+import com.cloudant.sync.replication.Replication.Filter;\n+\n+PullReplication pull = new PullReplication();\n+pull.source = this.getURI();\n+pull.target = this.datastore;\n+Replication.Filter filter = new Replication.Filter(\"filterDoc/filterFunctionName\",\n+    ImmutableMap.of(\"key\", \"value\"));","path":"doc/replication.md","position":null,"original_position":101,"commit_id":"1b51ca83ad1b076f71d35b8dc0fb90e144dfbda6","original_commit_id":"0ca84b3e2a20a7225c9d6f8fccced3890ec22d1d","user":{"login":"dongshengbc","id":299925,"avatar_url":"https://gravatar.com/avatar/5e8423d8e073c91b19db57e682ae995e?d=https%3A%2F%2Fidenticons.github.com%2F9b8d2ba62151dfdd7eccddee6b0d98df.png&r=x","gravatar_id":"5e8423d8e073c91b19db57e682ae995e","url":"https://api.github.com/users/dongshengbc","html_url":"https://github.com/dongshengbc","followers_url":"https://api.github.com/users/dongshengbc/followers","following_url":"https://api.github.com/users/dongshengbc/following{/other_user}","gists_url":"https://api.github.com/users/dongshengbc/gists{/gist_id}","starred_url":"https://api.github.com/users/dongshengbc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dongshengbc/subscriptions","organizations_url":"https://api.github.com/users/dongshengbc/orgs","repos_url":"https://api.github.com/users/dongshengbc/repos","events_url":"https://api.github.com/users/dongshengbc/events{/privacy}","received_events_url":"https://api.github.com/users/dongshengbc/received_events","type":"User","site_admin":false},"body":"1b51ca83ad1b076f71d35b8dc0fb90e144dfbda6\r\n\r\n\r\nOn Fri, Mar 7, 2014 at 10:00 AM, Mike Rhodes <notifications@github.com>wrote:\r\n\r\n> In doc/replication.md:\r\n>\r\n> > +\r\n> > +[Filtered replication][1] is only supported for pull replication. It requies a\r\n> > +\"Filter\" object is added to \"PullReplicatoin\" to describe the\r\n> > +\"Filter Function\" that is used and is query parameters.\r\n> > +\r\n> > +```java\r\n> > +import com.cloudant.sync.replication.ReplicationFactory;\r\n> > +import com.cloudant.sync.replication.Replicator;\r\n> > +import com.cloudant.sync.replication.PullReplication;\r\n> > +import com.cloudant.sync.replication.Replication.Filter;\r\n> > +\r\n> > +PullReplication pull = new PullReplication();\r\n> > +pull.source = this.getURI();\r\n> > +pull.target = this.datastore;\r\n> > +Replication.Filter filter = new Replication.Filter(\"filterDoc/filterFunctionName\",\r\n> > +    ImmutableMap.of(\"key\", \"value\"));\r\n>\r\n> I'd like to keep this core Java so readers don't have to look up details\r\n> of unfamiliar APIs.\r\n>\r\n> —\r\n> Reply to this email directly or view it on GitHub<https://github.com/cloudant/sync-android/pull/16/files#r10385413>\r\n> .\r\n>","created_at":"2014-03-07T15:25:29Z","updated_at":"2014-03-07T15:25:29Z","html_url":"https://github.com/cloudant/sync-android/pull/16#discussion_r10386197","pull_request_url":"https://api.github.com/repos/cloudant/sync-android/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/cloudant/sync-android/pulls/comments/10386197"},"html":{"href":"https://github.com/cloudant/sync-android/pull/16#discussion_r10386197"},"pull_request":{"href":"https://api.github.com/repos/cloudant/sync-android/pulls/16"}}}}