From 5aad4a844766ebab9ffe425947513ca222e5ccfb Mon Sep 17 00:00:00 2001 From: Mike Wooldridge Date: Mon, 13 Feb 2017 17:54:47 -0800 Subject: [PATCH 1/2] fix(#227): clarify when a summary object appears in query results --- lib/query-builder.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/query-builder.js b/lib/query-builder.js index 770cd01c..5d1bc8a9 100644 --- a/lib/query-builder.js +++ b/lib/query-builder.js @@ -4983,7 +4983,9 @@ function snippet() { /** * Sets the withOptions clause of a built query to configure the query; * takes a configuration object with the following named parameters. - * This function may be called on the result of building a query. + * This function may be called on the result of building a query. When the + * 'debug', 'metrics', 'queryPlan', or 'similarDocs' parameter is set, a + * search summary object will be returned along with the result documents. * @method * @memberof queryBuilder# * @param {documents.categories} [categories] - the categories of information From b21b96bea6dbfb07899fce52706c0b681461c55c Mon Sep 17 00:00:00 2001 From: Mike Wooldridge Date: Wed, 15 Mar 2017 18:53:36 -0700 Subject: [PATCH 2/2] Add to jsdocs about withOptions(), categories --- lib/documents.js | 2 +- lib/query-builder.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/documents.js b/lib/documents.js index e31fc41a..302ad0dd 100644 --- a/lib/documents.js +++ b/lib/documents.js @@ -169,7 +169,7 @@ function wipeOutputTransform(/*headers, data*/) { /** * Categories of information to read or write for documents. * The possible values of the enumeration are - * content|collections|permissions|properties|quality|metadataValues|metadata where + * content|collections|metadataValues|permissions|properties|quality|metadata|none where * metadata is an alias for all of the categories other than content. * @typedef {enum} documents.categories */ diff --git a/lib/query-builder.js b/lib/query-builder.js index 5d1bc8a9..6123c711 100644 --- a/lib/query-builder.js +++ b/lib/query-builder.js @@ -4986,6 +4986,7 @@ function snippet() { * This function may be called on the result of building a query. When the * 'debug', 'metrics', 'queryPlan', or 'similarDocs' parameter is set, a * search summary object will be returned along with the result documents. + * When 'categories' is set to 'none', only a search summary is returned. * @method * @memberof queryBuilder# * @param {documents.categories} [categories] - the categories of information @@ -4993,7 +4994,8 @@ function snippet() { * @param {number} [concurrencyLevel] - the maximum number of threads to use to calculate facets * @param {...string} [forestNames] - the names of forests providing documents * for the result set - * @param {...string} [search] - options modifying the default behaviour of the query + * @param {...string} [search] - options + * modifying the default behaviour of the query * @param {string|transactions.Transaction} [txid] - a string * transaction id or Transaction object identifying an open * multi-statement transaction