diff --git a/docs/_descriptions/getSource.asciidoc b/docs/_descriptions/getSource.asciidoc index bfbf79e47..db98d95fc 100644 --- a/docs/_descriptions/getSource.asciidoc +++ b/docs/_descriptions/getSource.asciidoc @@ -1 +1 @@ -Get the source of a document by it's index, type and id. \ No newline at end of file +Get the source of a document by its index, type and id. diff --git a/docs/_descriptions/indices.close.asciidoc b/docs/_descriptions/indices.close.asciidoc index 6b5d227b1..6614ea063 100644 --- a/docs/_descriptions/indices.close.asciidoc +++ b/docs/_descriptions/indices.close.asciidoc @@ -1 +1 @@ -Close an index to remove it's overhead from the cluster. Closed index is blocked for read/write operations. \ No newline at end of file +Close an index to remove its overhead from the cluster. Closed index is blocked for read/write operations. diff --git a/docs/api_methods.asciidoc b/docs/api_methods.asciidoc index 75ae1ecdc..406c79ecd 100644 --- a/docs/api_methods.asciidoc +++ b/docs/api_methods.asciidoc @@ -889,7 +889,8 @@ link:#[back to top] client.getSource([params, [callback]]) -------- -Get the source of a document by it's index, type and id. +Get the source of a document by its index, type and id. + The default method is `GET` and the usual <> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.4/docs-get.html[the elasticsearch docs] for more about this method. @@ -1735,6 +1736,8 @@ Options::: `String, String[], Boolean` -- A list of fields to exclude from the returned _source field `_sourceInclude`:: `String, String[], Boolean` -- A list of fields to extract and return from the _source field +`terminateAfter`:: +`Number` -- The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. `stats`:: `String, String[], Boolean` -- Specific 'tag' of the request for logging and statistical purposes `suggestField`:: @@ -2953,7 +2956,8 @@ link:#[back to top] client.indices.close([params, [callback]]) -------- -Close an index to remove it's overhead from the cluster. Closed index is blocked for read/write operations. +Close an index to remove its overhead from the cluster. Closed index is blocked for read/write operations. + The default method is `POST` and the usual <> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.4/indices-open-close.html[the elasticsearch docs] for more about this method. diff --git a/docs/api_methods_0_90.asciidoc b/docs/api_methods_0_90.asciidoc index 9a4568303..859f2c92c 100644 --- a/docs/api_methods_0_90.asciidoc +++ b/docs/api_methods_0_90.asciidoc @@ -668,7 +668,8 @@ link:#[back to top] client.getSource([params, [callback]]) -------- -Get the source of a document by it's index, type and id. +Get the source of a document by its index, type and id. + The default method is `GET` and the usual <> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/docs-get.html[the elasticsearch docs] for more about this method. @@ -1988,7 +1989,8 @@ link:#[back to top] client.indices.close([params, [callback]]) -------- -Close an index to remove it's overhead from the cluster. Closed index is blocked for read/write operations. +Close an index to remove its overhead from the cluster. Closed index is blocked for read/write operations. + The default method is `POST` and the usual <> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-open-close.html[the elasticsearch docs] for more about this method. diff --git a/docs/api_methods_1_0.asciidoc b/docs/api_methods_1_0.asciidoc index dd689067b..37eb51bc4 100644 --- a/docs/api_methods_1_0.asciidoc +++ b/docs/api_methods_1_0.asciidoc @@ -763,7 +763,8 @@ link:#[back to top] client.getSource([params, [callback]]) -------- -Get the source of a document by it's index, type and id. +Get the source of a document by its index, type and id. + The default method is `GET` and the usual <> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-get.html[the elasticsearch docs] for more about this method. @@ -2529,7 +2530,8 @@ link:#[back to top] client.indices.close([params, [callback]]) -------- -Close an index to remove it's overhead from the cluster. Closed index is blocked for read/write operations. +Close an index to remove its overhead from the cluster. Closed index is blocked for read/write operations. + The default method is `POST` and the usual <> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-open-close.html[the elasticsearch docs] for more about this method. diff --git a/docs/api_methods_1_1.asciidoc b/docs/api_methods_1_1.asciidoc index e4da88aa1..50e8f4f24 100644 --- a/docs/api_methods_1_1.asciidoc +++ b/docs/api_methods_1_1.asciidoc @@ -775,7 +775,8 @@ link:#[back to top] client.getSource([params, [callback]]) -------- -Get the source of a document by it's index, type and id. +Get the source of a document by its index, type and id. + The default method is `GET` and the usual <> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-get.html[the elasticsearch docs] for more about this method. @@ -2607,7 +2608,8 @@ link:#[back to top] client.indices.close([params, [callback]]) -------- -Close an index to remove it's overhead from the cluster. Closed index is blocked for read/write operations. +Close an index to remove its overhead from the cluster. Closed index is blocked for read/write operations. + The default method is `POST` and the usual <> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-open-close.html[the elasticsearch docs] for more about this method. diff --git a/docs/api_methods_1_2.asciidoc b/docs/api_methods_1_2.asciidoc index cdd4b2f18..1940c41f0 100644 --- a/docs/api_methods_1_2.asciidoc +++ b/docs/api_methods_1_2.asciidoc @@ -800,7 +800,8 @@ link:#[back to top] client.getSource([params, [callback]]) -------- -Get the source of a document by it's index, type and id. +Get the source of a document by its index, type and id. + The default method is `GET` and the usual <> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-get.html[the elasticsearch docs] for more about this method. @@ -2720,7 +2721,8 @@ link:#[back to top] client.indices.close([params, [callback]]) -------- -Close an index to remove it's overhead from the cluster. Closed index is blocked for read/write operations. +Close an index to remove its overhead from the cluster. Closed index is blocked for read/write operations. + The default method is `POST` and the usual <> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-open-close.html[the elasticsearch docs] for more about this method. diff --git a/docs/api_methods_1_3.asciidoc b/docs/api_methods_1_3.asciidoc index cf4743be8..45a885c4d 100644 --- a/docs/api_methods_1_3.asciidoc +++ b/docs/api_methods_1_3.asciidoc @@ -879,7 +879,8 @@ link:#[back to top] client.getSource([params, [callback]]) -------- -Get the source of a document by it's index, type and id. +Get the source of a document by its index, type and id. + The default method is `GET` and the usual <> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.3/docs-get.html[the elasticsearch docs] for more about this method. @@ -2870,7 +2871,8 @@ link:#[back to top] client.indices.close([params, [callback]]) -------- -Close an index to remove it's overhead from the cluster. Closed index is blocked for read/write operations. +Close an index to remove its overhead from the cluster. Closed index is blocked for read/write operations. + The default method is `POST` and the usual <> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.3/indices-open-close.html[the elasticsearch docs] for more about this method. diff --git a/docs/browser_builds.asciidoc b/docs/browser_builds.asciidoc index c90a332f1..ac7b76934 100644 --- a/docs/browser_builds.asciidoc +++ b/docs/browser_builds.asciidoc @@ -3,7 +3,7 @@ We also provide builds of the elasticsearch.js client for use in the browser. These versions of the client are currently ***experimental***. We test these builds using https://saucelabs.com/u/elasticsearch-js[saucelabs] in Chrome, Firefox, and Internet Explorer 10, and 11. -While there is https://github.com/elasticsearch/elasticsearch-js/issues/96#issuecomment-42617480[a way to get it working in IE 9], the browser severly limits what you can do with cross-domain requests. Because of these limits, many of the API calls and other functionality do not work. +While there is https://github.com/elasticsearch/elasticsearch-js/issues/96#issuecomment-42617480[a way to get it working in IE 9], the browser severely limits what you can do with cross-domain requests. Because of these limits, many of the API calls and other functionality do not work. === Bower If you use bower to manage your dependencies, then just run: diff --git a/docs/configuration.asciidoc b/docs/configuration.asciidoc index f55f54721..f62a99d8d 100644 --- a/docs/configuration.asciidoc +++ b/docs/configuration.asciidoc @@ -1,7 +1,7 @@ [[configuration]] == Configuration -The `Client` constructor accepts a single object as it's argument. In the <> section all of the available options/keys are listed. +The `Client` constructor accepts a single object as its argument. In the <> section all of the available options/keys are listed. [source,js] ------ diff --git a/docs/errors.asciidoc b/docs/errors.asciidoc index 3fe1cbb1a..7620b3cc0 100644 --- a/docs/errors.asciidoc +++ b/docs/errors.asciidoc @@ -7,7 +7,7 @@ These are the standard Error types which may be passed back from the client. To `ConnectionFault`:: The connection was unable to initiate or complete a request with the Elasticsearch node. `NoConnections`:: All of the connections in the ConnectionPool are dead. `RequestTimeout`:: The request timed-out. -`Serialization`:: The response received from Elasticsearch could not be deserilaized. +`Serialization`:: The response received from Elasticsearch could not be deserialized. `503` or `ServiceUnavailable`:: Elasticsearch responded with a 503 status. `500` or `InternalServerError`:: Elasticsearch responded with a 500 status. `412` or `PreconditionFailed`:: Elasticsearch responded with a 412 status. @@ -15,4 +15,4 @@ These are the standard Error types which may be passed back from the client. To `403` or `Forbidden`:: Elasticsearch responded with a 403 status. `404` or `NotFound`:: Elasticsearch responded with a 404 status. `400` or `BadRequest`:: Elasticsearch responded with a 400 status. -`Generic`:: Elasticsearch responded with a status that does not map to it's own error type. \ No newline at end of file +`Generic`:: Elasticsearch responded with a status that does not map to its own error type. diff --git a/docs/extending_core_components.asciidoc b/docs/extending_core_components.asciidoc index ab4439a0e..7fa3b51f3 100644 --- a/docs/extending_core_components.asciidoc +++ b/docs/extending_core_components.asciidoc @@ -29,4 +29,4 @@ var client = new elasticsearch.Client({ client.getDog( ... ); -------------- -When the client is created, it's prototype is set to the API version selected, and therefore you can access the client via the `this` variable within your API methods. Make requests within your methods using `this.transport.request(params, cb)`. For more information about the transport, see <>. \ No newline at end of file +When the client is created, its prototype is set to the API version selected, and therefore you can access the client via the `this` variable within your API methods. Make requests within your methods using `this.transport.request(params, cb)`. For more information about the transport, see <>. diff --git a/docs/quick_start.asciidoc b/docs/quick_start.asciidoc index 2332b7b4f..7960dc2d3 100644 --- a/docs/quick_start.asciidoc +++ b/docs/quick_start.asciidoc @@ -18,7 +18,7 @@ var client = new elasticsearch.Client({ Almost all of the methods on the client accept two arguments: * `params` - an optional object/hash of parameters <>. - * `callback` - an optional function that will be called with the final result of the method. When omitted, a https://github.com/cujojs/when/blob/master/docs/api.md#promise[promise] is returned. api-conventions-cb[More info here]. + * `callback` - an optional function that will be called with the final result of the method. When omitted, a https://github.com/cujojs/when/blob/master/docs/api.md#promise[promise] is returned. <>. ==== Ping the cluster @@ -70,11 +70,11 @@ client.indices.delete({ ----------------- === Searching for documents -A very common use-case for elasticsearch is to sort through large collections of documents in order to find ones that are relavent to a query. In most cases you will use the client's `search()` method to accomplish this. +A very common use-case for elasticsearch is to sort through large collections of documents in order to find ones that are relevant to a query. In most cases you will use the client's `search()` method to accomplish this. ==== Elasticsearch Query DSL -For many searches you will want to define a search document that tells elasticsearch exactly how to find the documents you are looking for. To do this you will use the http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl.html[elasticsearch query DSL]. If you are not familiary with Elasticsearch's query DSL is it recommended that you research the topic at elasticsearch.org or watch/read one of these introductions: +For many searches you will want to define a search document that tells elasticsearch exactly how to find the documents you are looking for. To do this you will use the http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl.html[elasticsearch query DSL]. If you are not familiar with Elasticsearch's query DSL is it recommended that you research the topic at elasticsearch.org or watch/read one of these introductions: * https://www.youtube.com/watch?v=52G5ZzE0XpY#t=1471[Clinton Gormley "Getting down and dirty with Elasticsearch"] * http://okfnlabs.org/blog/2013/07/01/elasticsearch-query-tutorial.html#query-dsl-overview[Querying Elasticsearch - A Tutorial and Guide] diff --git a/src/lib/apis/1_4.js b/src/lib/apis/1_4.js index 00f72bf2a..f5a527483 100644 --- a/src/lib/apis/1_4.js +++ b/src/lib/apis/1_4.js @@ -5051,6 +5051,7 @@ api.scroll = ca({ * @param {String, String[], Boolean} params._source - True or false to return the _source field or not, or a list of fields to return * @param {String, String[], Boolean} params._sourceExclude - A list of fields to exclude from the returned _source field * @param {String, String[], Boolean} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {Number} params.terminateAfter - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. * @param {String, String[], Boolean} params.stats - Specific 'tag' of the request for logging and statistical purposes * @param {String} params.suggestField - Specify which field to use for suggestions * @param {String} [params.suggestMode=missing] - Specify suggest mode @@ -5165,6 +5166,10 @@ api.search = ca({ type: 'list', name: '_source_include' }, + terminateAfter: { + type: 'number', + name: 'terminate_after' + }, stats: { type: 'list' }, diff --git a/src/lib/apis/1_x.js b/src/lib/apis/1_x.js index 447c3314e..10e254c93 100644 --- a/src/lib/apis/1_x.js +++ b/src/lib/apis/1_x.js @@ -4428,6 +4428,7 @@ api.nodes = function NodesNS(transport) { * @param {Date, Number} params.interval - The interval for the second sampling of threads * @param {Number} params.snapshots - Number of samples of thread stacktrace (default: 10) * @param {Number} params.threads - Specify the number of threads to provide information for (default: 3) + * @param {Boolean} params.ignoreIdleThreads - Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true) * @param {String} params.type - The type to sample (default: cpu) * @param {String, String[], Boolean} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes */ @@ -4442,6 +4443,10 @@ api.nodes.prototype.hotThreads = ca({ threads: { type: 'number' }, + ignoreIdleThreads: { + type: 'boolean', + name: 'ignore_idle_threads' + }, type: { type: 'enum', options: [ diff --git a/src/lib/apis/master.js b/src/lib/apis/master.js index abe9d0088..c6dd9036c 100644 --- a/src/lib/apis/master.js +++ b/src/lib/apis/master.js @@ -148,7 +148,7 @@ api.cat = function CatNS(transport) { * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display * @param {Boolean} params.help - Return help information - * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {Boolean} [params.v=true] - Verbose mode. Display column headers * @param {String, String[], Boolean} params.name - A comma-separated list of alias names to return */ api.cat.prototype.aliases = ca({ @@ -169,7 +169,7 @@ api.cat.prototype.aliases = ca({ }, v: { type: 'boolean', - 'default': false + 'default': true } }, urls: [ @@ -196,7 +196,7 @@ api.cat.prototype.aliases = ca({ * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display * @param {Boolean} params.help - Return help information - * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {Boolean} [params.v=true] - Verbose mode. Display column headers * @param {String, String[], Boolean} params.nodeId - A comma-separated list of node IDs or names to limit the returned information */ api.cat.prototype.allocation = ca({ @@ -226,7 +226,7 @@ api.cat.prototype.allocation = ca({ }, v: { type: 'boolean', - 'default': false + 'default': true } }, urls: [ @@ -252,7 +252,7 @@ api.cat.prototype.allocation = ca({ * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display * @param {Boolean} params.help - Return help information - * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {Boolean} [params.v=true] - Verbose mode. Display column headers * @param {String, String[], Boolean} params.index - A comma-separated list of index names to limit the returned information */ api.cat.prototype.count = ca({ @@ -273,7 +273,7 @@ api.cat.prototype.count = ca({ }, v: { type: 'boolean', - 'default': false + 'default': true } }, urls: [ @@ -300,7 +300,7 @@ api.cat.prototype.count = ca({ * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display * @param {Boolean} params.help - Return help information - * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {Boolean} [params.v=true] - Verbose mode. Display column headers * @param {String, String[], Boolean} params.fields - A comma-separated list of fields to return the fielddata size */ api.cat.prototype.fielddata = ca({ @@ -330,7 +330,7 @@ api.cat.prototype.fielddata = ca({ }, v: { type: 'boolean', - 'default': false + 'default': true }, fields: { type: 'list' @@ -360,7 +360,7 @@ api.cat.prototype.fielddata = ca({ * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display * @param {Boolean} params.help - Return help information * @param {Boolean} [params.ts=true] - Set to false to disable timestamping - * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {Boolean} [params.v=true] - Verbose mode. Display column headers */ api.cat.prototype.health = ca({ params: { @@ -384,7 +384,7 @@ api.cat.prototype.health = ca({ }, v: { type: 'boolean', - 'default': false + 'default': true } }, url: { @@ -420,7 +420,7 @@ api.cat.prototype.help = ca({ * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display * @param {Boolean} params.help - Return help information * @param {Boolean} params.pri - Set to true to return stats only for primary shards - * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {Boolean} [params.v=true] - Verbose mode. Display column headers * @param {String, String[], Boolean} params.index - A comma-separated list of index names to limit the returned information */ api.cat.prototype.indices = ca({ @@ -454,7 +454,7 @@ api.cat.prototype.indices = ca({ }, v: { type: 'boolean', - 'default': false + 'default': true } }, urls: [ @@ -480,7 +480,7 @@ api.cat.prototype.indices = ca({ * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display * @param {Boolean} params.help - Return help information - * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {Boolean} [params.v=true] - Verbose mode. Display column headers */ api.cat.prototype.master = ca({ params: { @@ -500,7 +500,7 @@ api.cat.prototype.master = ca({ }, v: { type: 'boolean', - 'default': false + 'default': true } }, url: { @@ -516,7 +516,7 @@ api.cat.prototype.master = ca({ * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display * @param {Boolean} params.help - Return help information - * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {Boolean} [params.v=true] - Verbose mode. Display column headers */ api.cat.prototype.nodes = ca({ params: { @@ -536,7 +536,7 @@ api.cat.prototype.nodes = ca({ }, v: { type: 'boolean', - 'default': false + 'default': true } }, url: { @@ -552,7 +552,7 @@ api.cat.prototype.nodes = ca({ * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display * @param {Boolean} params.help - Return help information - * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {Boolean} [params.v=true] - Verbose mode. Display column headers */ api.cat.prototype.pendingTasks = ca({ params: { @@ -572,7 +572,7 @@ api.cat.prototype.pendingTasks = ca({ }, v: { type: 'boolean', - 'default': false + 'default': true } }, url: { @@ -588,7 +588,7 @@ api.cat.prototype.pendingTasks = ca({ * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display * @param {Boolean} params.help - Return help information - * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {Boolean} [params.v=true] - Verbose mode. Display column headers */ api.cat.prototype.plugins = ca({ params: { @@ -608,7 +608,7 @@ api.cat.prototype.plugins = ca({ }, v: { type: 'boolean', - 'default': false + 'default': true } }, url: { @@ -624,7 +624,7 @@ api.cat.prototype.plugins = ca({ * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display * @param {Boolean} params.help - Return help information - * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {Boolean} [params.v=true] - Verbose mode. Display column headers * @param {String, String[], Boolean} params.index - A comma-separated list of index names to limit the returned information */ api.cat.prototype.recovery = ca({ @@ -651,7 +651,7 @@ api.cat.prototype.recovery = ca({ }, v: { type: 'boolean', - 'default': false + 'default': true } }, urls: [ @@ -677,7 +677,7 @@ api.cat.prototype.recovery = ca({ * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display * @param {Boolean} params.help - Return help information - * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {Boolean} [params.v=true] - Verbose mode. Display column headers * @param {String, String[], Boolean} params.index - A comma-separated list of index names to limit the returned information */ api.cat.prototype.shards = ca({ @@ -698,7 +698,7 @@ api.cat.prototype.shards = ca({ }, v: { type: 'boolean', - 'default': false + 'default': true } }, urls: [ @@ -724,7 +724,7 @@ api.cat.prototype.shards = ca({ * @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display * @param {Boolean} params.help - Return help information - * @param {Boolean} params.v - Verbose mode. Display column headers + * @param {Boolean} [params.v=true] - Verbose mode. Display column headers * @param {Boolean} params.fullId - Enables displaying the complete node ids */ api.cat.prototype.threadPool = ca({ @@ -745,7 +745,7 @@ api.cat.prototype.threadPool = ca({ }, v: { type: 'boolean', - 'default': false + 'default': true }, fullId: { type: 'boolean', @@ -4360,6 +4360,8 @@ api.msearch = ca({ * @param {String} params.routing - Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs". * @param {String} params.parent - Parent id of documents. Applies to all returned documents unless otherwise specified in body "params" or "docs". * @param {Boolean} params.realtime - Specifies if requests are real-time as opposed to near-real-time (default: true). + * @param {Number} params.version - Explicit version number for concurrency control + * @param {String} params.versionType - Specific version type * @param {String} params.index - The index in which the document resides. * @param {String} params.type - The type of the document. */ @@ -4415,6 +4417,19 @@ api.mtermvectors = ca({ realtime: { type: 'boolean', required: false + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' } }, urls: [ @@ -4455,6 +4470,7 @@ api.nodes = function NodesNS(transport) { * @param {Date, Number} params.interval - The interval for the second sampling of threads * @param {Number} params.snapshots - Number of samples of thread stacktrace (default: 10) * @param {Number} params.threads - Specify the number of threads to provide information for (default: 3) + * @param {Boolean} params.ignoreIdleThreads - Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true) * @param {String} params.type - The type to sample (default: cpu) * @param {String, String[], Boolean} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes */ @@ -4469,6 +4485,10 @@ api.nodes.prototype.hotThreads = ca({ threads: { type: 'number' }, + ignoreIdleThreads: { + type: 'boolean', + name: 'ignore_idle_threads' + }, type: { type: 'enum', options: [ @@ -5082,6 +5102,7 @@ api.scroll = ca({ * @param {String, String[], Boolean} params._source - True or false to return the _source field or not, or a list of fields to return * @param {String, String[], Boolean} params._sourceExclude - A list of fields to exclude from the returned _source field * @param {String, String[], Boolean} params._sourceInclude - A list of fields to extract and return from the _source field + * @param {Number} params.terminateAfter - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. * @param {String, String[], Boolean} params.stats - Specific 'tag' of the request for logging and statistical purposes * @param {String} params.suggestField - Specify which field to use for suggestions * @param {String} [params.suggestMode=missing] - Specify suggest mode @@ -5192,6 +5213,10 @@ api.search = ca({ type: 'list', name: '_source_include' }, + terminateAfter: { + type: 'number', + name: 'terminate_after' + }, stats: { type: 'list' }, @@ -5854,6 +5879,8 @@ api.suggest = ca({ * @param {String} params.routing - Specific routing value. * @param {String} params.parent - Parent id of documents. * @param {Boolean} params.realtime - Specifies if request is real-time as opposed to near-real-time (default: true). + * @param {Number} params.version - Explicit version number for concurrency control + * @param {String} params.versionType - Specific version type * @param {String} params.index - The index in which the document resides. * @param {String} params.type - The type of the document. * @param {String} params.id - The id of the document, when not specified a doc param should be supplied. @@ -5911,6 +5938,19 @@ api.termvectors = ca({ realtime: { type: 'boolean', required: false + }, + version: { + type: 'number' + }, + versionType: { + type: 'enum', + options: [ + 'internal', + 'external', + 'external_gte', + 'force' + ], + name: 'version_type' } }, urls: [