From fc97907e3362796c3851458fcf6dd0210876be79 Mon Sep 17 00:00:00 2001 From: Jan Johannes Date: Fri, 17 Mar 2023 00:58:17 +0200 Subject: [PATCH 1/2] add partition option --- packages/node_modules/pouchdb-abstract-mapreduce/src/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } } From 4addaf7b68bc686efaaa14e59be92021d2dba970 Mon Sep 17 00:00:00 2001 From: Jan Johannes Date: Fri, 17 Mar 2023 01:39:41 +0200 Subject: [PATCH 2/2] add line to documentation --- docs/_includes/api/query_database.html | 1 + 1 file changed, 1 insertion(+) 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).