ramanjit.singh
ramanjit.singh

Reputation: 91

What are the expected parameters when syncing PouchDB and Cloudant

I am trying to setup replication between PouchDB and Cloudant using doc_ids array option

localpouchdb.sync(cloudantremoteDBURL, { doc_ids:['1450853987668'] })

Some error is thrown by cloudant

error: true
message: "Something wrong with the request"
name: "bad_request"
reason: "filter parameter must be of the form `designname/filtername`"

Anyone able to syn pouchDB with cloudant using doc_ids options?

Upvotes: 2

Views: 175

Answers (2)

ramanjit.singh
ramanjit.singh

Reputation: 91

I raised a support ticket with IBM Cloudant, and confirmed that _doc_ids filter is not yet implemented in the cloudant. Following is the response from their support:

Unfortunately, Cloudant doesn't currently implement the _doc_ids filter on the _changes feed. We are planning a release early in the new year which includes the latest CouchDB feature set, including the _doc_ids filter.

Upvotes: 2

ukmadlz
ukmadlz

Reputation: 151

According to the docs on sync http://pouchdb.com/api.html#sync you should be setting the source and target, then passing the doc_ids into the options

Something like

PouchDB.sync(localDB, cloudantremoteDBURL, { doc_ids:['1450853987668'] })

Upvotes: 0

Related Questions