diff --git a/docs/_includes/api/query_database.html b/docs/_includes/api/query_database.html index 7050aeab99..c8a3a204dd 100644 --- a/docs/_includes/api/query_database.html +++ b/docs/_includes/api/query_database.html @@ -56,6 +56,7 @@ * `'ok'`: Returns results immediately, even if they're out-of-date. * `'update_after'`: Returns results immediately, but kicks off a build afterwards. * `options.update_seq`: Include an `update_seq` value indicating which sequence id of the underlying database the view reflects. +* `options.partition`: If you query a couchdb database with the http adapter and a partitioned index, you need to add the partition key. For details, see the [CouchDB query options documentation](http://docs.couchdb.org/en/stable/api/ddoc/views.html#get--db-_design-ddoc-_view-view). diff --git a/packages/node_modules/pouchdb-abstract-mapreduce/src/index.js b/packages/node_modules/pouchdb-abstract-mapreduce/src/index.js index 7f9333ba46..ee5c37fad4 100644 --- a/packages/node_modules/pouchdb-abstract-mapreduce/src/index.js +++ b/packages/node_modules/pouchdb-abstract-mapreduce/src/index.js @@ -252,6 +252,7 @@ function createAbstractMapReduce(localDocName, mapper, reducer, ddocValidator) { addHttpParam('inclusive_end', opts, params); addHttpParam('key', opts, params, true); addHttpParam('update_seq', opts, params); + addHttpParam('partition', opts, params); // Format the list of parameters into a valid URI query string params = params.join('&'); @@ -708,7 +709,7 @@ function createAbstractMapReduce(localDocName, mapper, reducer, ddocValidator) { view.seq = currentSeq; view.sourceDB.activeTasks.remove(taskId); } catch (error) { - view.sourceDB.activeTasks.remove(taskId, error); + view.sourceDB.activeTasks.remove(taskId, error); } }