Filtered PullReplication on a channel

Hi Folks,

I have android LITE with below pull setup.

Replication pullReplication = database.createPullReplication(syncUrl);
pullReplication.setContinuous(true);
Authenticator auth = new BasicAuthenticator(user, “password”);
pullReplication.setAuthenticator(auth);
userChannel = Arrays.asList(“user1”);
pullReplication.setChannels(userChannel);
pullReplication.setFilter(“designdoc/itemFilter”);
Map<String, Object> params = new HashMap<String, Object>();
params.put(“searchid”, “item”);
pullReplication.setFilterParams(params);
pullReplication.start();
pullReplication.addChangeListener(this);

How do i deal with filters if i am using couchbase server.?

Channel and filter can work together?

Basically I want to pull some filtered docs which belongs to a channel.

Have created views and done some emit http://docs.couchbase.com/admin/admin/UI/ui-views-editor.html.

Is the the way the filters work if i am not using couchDB?if so how to set filters in lite.

Something similar to https://github.com/couchbase/couchbase-lite-android/issues/200

Little puzzled help me out.

Thanks
Ntihin

Sync Gateway doesn’t support arbitrary filters, only filtering by channel.

Ok…Why does it not supported at SyncGateway?

http://developer.couchbase.com/mobile/develop/references/couchbase-lite/couchbase-lite/replication/replication/index.html#string-docids--get-set-

Is setDocIds applicable for PULL, can i use this for filtered pull based on docids??

Thanks
Nithin

Some compatible servers (CouchDB) support arbitrary server-side filters. SG uses channels instead, because they’re much more scalable.

SG also doesn’t yet support syncing with a list of docIDs. (Github issue)

@jens @hideki DocIds based fetch is possible now in CBL android from SyncGateway?

Sorry, I forgot it had been implemented for 1.2. Yes, it should now work.

@jens

Where can i find the documentation for Docids based fetch?

http://developer.couchbase.com/documentation/mobile/1.2/develop/references/couchbase-lite/couchbase-lite/replication/replication/index.html