diff --git a/docs/api_methods.asciidoc b/docs/api_methods.asciidoc index d853174f4..6dd327a31 100644 --- a/docs/api_methods.asciidoc +++ b/docs/api_methods.asciidoc @@ -621,7 +621,8 @@ link:#[back to top] client.explain([params, [callback]]) -------- -Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. Also check out http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html[percolaters]. +Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. + Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-explain.html[the elasticsearch docs] for more information pertaining to this method. diff --git a/docs/api_methods_0_90.asciidoc b/docs/api_methods_0_90.asciidoc index a74659255..327885259 100644 --- a/docs/api_methods_0_90.asciidoc +++ b/docs/api_methods_0_90.asciidoc @@ -455,7 +455,8 @@ link:#[back to top] client.explain([params, [callback]]) -------- -Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. Also check out http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html[percolaters]. +Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. + Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/0.90/search-explain.html[the elasticsearch docs] for more information pertaining to this method. diff --git a/docs/api_methods_1_7.asciidoc b/docs/api_methods_1_7.asciidoc index c3a7ed40c..7a8c6fced 100644 --- a/docs/api_methods_1_7.asciidoc +++ b/docs/api_methods_1_7.asciidoc @@ -616,7 +616,8 @@ link:#[back to top] client.explain([params, [callback]]) -------- -Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. Also check out http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html[percolaters]. +Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. + Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/1.7/search-explain.html[the elasticsearch docs] for more information pertaining to this method. diff --git a/docs/api_methods_2_4.asciidoc b/docs/api_methods_2_4.asciidoc index acba36d67..5ba2b3343 100644 --- a/docs/api_methods_2_4.asciidoc +++ b/docs/api_methods_2_4.asciidoc @@ -511,7 +511,8 @@ link:#[back to top] client.explain([params, [callback]]) -------- -Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. Also check out http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html[percolaters]. +Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. + Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/2.4/search-explain.html[the elasticsearch docs] for more information pertaining to this method. diff --git a/docs/api_methods_5_0.asciidoc b/docs/api_methods_5_0.asciidoc index 14376d928..fa3f4f7fc 100644 --- a/docs/api_methods_5_0.asciidoc +++ b/docs/api_methods_5_0.asciidoc @@ -634,7 +634,8 @@ link:#[back to top] client.explain([params, [callback]]) -------- -Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. Also check out http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html[percolaters]. +Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. + Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/5.0/search-explain.html[the elasticsearch docs] for more information pertaining to this method. diff --git a/docs/api_methods_5_1.asciidoc b/docs/api_methods_5_1.asciidoc index 68c64b07c..cc68e7604 100644 --- a/docs/api_methods_5_1.asciidoc +++ b/docs/api_methods_5_1.asciidoc @@ -632,7 +632,8 @@ link:#[back to top] client.explain([params, [callback]]) -------- -Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. Also check out http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html[percolaters]. +Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. + Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/5.1/search-explain.html[the elasticsearch docs] for more information pertaining to this method. diff --git a/docs/api_methods_5_2.asciidoc b/docs/api_methods_5_2.asciidoc index b35211af0..8870ec552 100644 --- a/docs/api_methods_5_2.asciidoc +++ b/docs/api_methods_5_2.asciidoc @@ -632,7 +632,8 @@ link:#[back to top] client.explain([params, [callback]]) -------- -Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. Also check out http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html[percolaters]. +Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. + Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/5.2/search-explain.html[the elasticsearch docs] for more information pertaining to this method. diff --git a/docs/api_methods_5_3.asciidoc b/docs/api_methods_5_3.asciidoc index 56016abea..74abf7749 100644 --- a/docs/api_methods_5_3.asciidoc +++ b/docs/api_methods_5_3.asciidoc @@ -632,7 +632,8 @@ link:#[back to top] client.explain([params, [callback]]) -------- -Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. Also check out http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html[percolaters]. +Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. + Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/5.3/search-explain.html[the elasticsearch docs] for more information pertaining to this method. diff --git a/docs/api_methods_5_4.asciidoc b/docs/api_methods_5_4.asciidoc index 28685627e..d6f6f63c5 100644 --- a/docs/api_methods_5_4.asciidoc +++ b/docs/api_methods_5_4.asciidoc @@ -705,7 +705,8 @@ link:#[back to top] client.explain([params, [callback]]) -------- -Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. Also check out http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html[percolaters]. +Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. + Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/5.4/search-explain.html[the elasticsearch docs] for more information pertaining to this method. diff --git a/docs/api_methods_5_5.asciidoc b/docs/api_methods_5_5.asciidoc index beaeae55b..537dc03d1 100644 --- a/docs/api_methods_5_5.asciidoc +++ b/docs/api_methods_5_5.asciidoc @@ -705,7 +705,8 @@ link:#[back to top] client.explain([params, [callback]]) -------- -Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. Also check out http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html[percolaters]. +Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. + Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/5.5/search-explain.html[the elasticsearch docs] for more information pertaining to this method. diff --git a/docs/api_methods_5_6.asciidoc b/docs/api_methods_5_6.asciidoc index 1fff9158e..0b5343bd9 100644 --- a/docs/api_methods_5_6.asciidoc +++ b/docs/api_methods_5_6.asciidoc @@ -711,7 +711,8 @@ link:#[back to top] client.explain([params, [callback]]) -------- -Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. Also check out http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html[percolaters]. +Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. + Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/5.6/search-explain.html[the elasticsearch docs] for more information pertaining to this method. diff --git a/docs/api_methods_6_0.asciidoc b/docs/api_methods_6_0.asciidoc index 13dbf181e..23911237e 100644 --- a/docs/api_methods_6_0.asciidoc +++ b/docs/api_methods_6_0.asciidoc @@ -621,7 +621,8 @@ link:#[back to top] client.explain([params, [callback]]) -------- -Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. Also check out http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html[percolaters]. +Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. + Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-explain.html[the elasticsearch docs] for more information pertaining to this method. diff --git a/docs/api_methods_6_1.asciidoc b/docs/api_methods_6_1.asciidoc index 052171fff..20730cfd6 100644 --- a/docs/api_methods_6_1.asciidoc +++ b/docs/api_methods_6_1.asciidoc @@ -621,7 +621,8 @@ link:#[back to top] client.explain([params, [callback]]) -------- -Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. Also check out http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html[percolaters]. +Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. + Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.1/search-explain.html[the elasticsearch docs] for more information pertaining to this method. diff --git a/docs/api_methods_6_2.asciidoc b/docs/api_methods_6_2.asciidoc index 102554ca6..caa1be533 100644 --- a/docs/api_methods_6_2.asciidoc +++ b/docs/api_methods_6_2.asciidoc @@ -621,7 +621,8 @@ link:#[back to top] client.explain([params, [callback]]) -------- -Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. Also check out http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html[percolaters]. +Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. + Check the *<>* and https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-explain.html[the elasticsearch docs] for more information pertaining to this method. diff --git a/src/lib/apis/6_x.js b/src/lib/apis/6_x.js index edcfbc481..73636c3be 100644 --- a/src/lib/apis/6_x.js +++ b/src/lib/apis/6_x.js @@ -2085,6 +2085,32 @@ api.deleteByQuery = ca({ method: 'POST' }); +/** + * Perform a [deleteByQueryRethrottle](https://www.elastic.co/guide/en/elasticsearch/reference/6.x/docs-delete-by-query.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.requestsPerSecond - The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. + * @param {<>} params.taskId - The task id to rethrottle + */ +api.deleteByQueryRethrottle = ca({ + params: { + requestsPerSecond: { + type: 'number', + required: true, + name: 'requests_per_second' + } + }, + url: { + fmt: '/_delete_by_query/<%=taskId%>/_rethrottle', + req: { + taskId: { + type: 'string' + } + } + }, + method: 'POST' +}); + /** * Perform a [deleteScript](https://www.elastic.co/guide/en/elasticsearch/reference/6.x/modules-scripting.html) request * @@ -2700,25 +2726,11 @@ api.indices = namespace(); * * @param {Object} params - An object with parameters used to carry out this action * @param {<>} params.index - The name of the index to scope the operation - * @param {<>} params.preferLocal - With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true) - * @param {<>} [params.format=detailed] - Format of the output */ api.indices.prototype.analyze = ca({ params: { index: { type: 'string' - }, - preferLocal: { - type: 'boolean', - name: 'prefer_local' - }, - format: { - type: 'enum', - 'default': 'detailed', - options: [ - 'detailed', - 'text' - ] } }, urls: [ @@ -3391,6 +3403,7 @@ api.indices.prototype.forcemerge = ca({ * @param {<>} [params.expandWildcards=open] - Whether wildcard expressions should get expanded to open or closed indices (default: open) * @param {<>} params.flatSettings - Return settings in flat format (default: false) * @param {<>} params.includeDefaults - Whether to return all default setting for each of the indices. + * @param {<>} params.masterTimeout - Specify timeout for connection to master * @param {<>, <>, <>} params.index - A comma-separated list of index names */ api.indices.prototype.get = ca({ @@ -3425,6 +3438,10 @@ api.indices.prototype.get = ca({ type: 'boolean', 'default': false, name: 'include_defaults' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' } }, url: { @@ -4970,6 +4987,7 @@ api.mget = ca({ * @param {<>} params.maxConcurrentSearches - Controls the maximum number of concurrent searches the multi search api will execute * @param {<>} params.typedKeys - Specify whether aggregation and suggester names should be prefixed by their respective types in the response * @param {<>} [params.preFilterShardSize=128] - A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. + * @param {<>} [params.maxConcurrentShardRequests=The default grows with the number of nodes in the cluster but is at most 256.] - The number of concurrent shard requests each sub search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests * @param {<>, <>, <>} params.index - A comma-separated list of index names to use as default * @param {<>, <>, <>} params.type - A comma-separated list of document types to use as default */ @@ -4997,6 +5015,11 @@ api.msearch = ca({ type: 'number', 'default': 128, name: 'pre_filter_shard_size' + }, + maxConcurrentShardRequests: { + type: 'number', + 'default': 'The default grows with the number of nodes in the cluster but is at most 256.', + name: 'max_concurrent_shard_requests' } }, urls: [ @@ -5333,6 +5356,35 @@ api.nodes.prototype.info = ca({ ] }); +/** + * Perform a [nodes.reloadSecureSettings](https://www.elastic.co/guide/en/elasticsearch/reference/6.x/cluster-nodes-reload-secure-settings.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>, <>, <>} params.nodeId - A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes. + */ +api.nodes.prototype.reloadSecureSettings = ca({ + params: { + timeout: { + type: 'time' + } + }, + urls: [ + { + fmt: '/_nodes/<%=nodeId%>/reload_secure_settings', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_nodes/reload_secure_settings' + } + ], + method: 'POST' +}); + /** * Perform a [nodes.stats](https://www.elastic.co/guide/en/elasticsearch/reference/6.x/cluster-nodes-stats.html) request * @@ -7080,3 +7132,29 @@ api.updateByQuery = ca({ ], method: 'POST' }); + +/** + * Perform a [updateByQueryRethrottle](https://www.elastic.co/guide/en/elasticsearch/reference/6.x/docs-update-by-query.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.requestsPerSecond - The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. + * @param {<>} params.taskId - The task id to rethrottle + */ +api.updateByQueryRethrottle = ca({ + params: { + requestsPerSecond: { + type: 'number', + required: true, + name: 'requests_per_second' + } + }, + url: { + fmt: '/_update_by_query/<%=taskId%>/_rethrottle', + req: { + taskId: { + type: 'string' + } + } + }, + method: 'POST' +}); diff --git a/src/lib/apis/master.js b/src/lib/apis/master.js index 4858c1631..cccab7db0 100644 --- a/src/lib/apis/master.js +++ b/src/lib/apis/master.js @@ -2104,6 +2104,32 @@ api.deleteByQuery = ca({ method: 'POST' }); +/** + * Perform a [deleteByQueryRethrottle](https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.requestsPerSecond - The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. + * @param {<>} params.taskId - The task id to rethrottle + */ +api.deleteByQueryRethrottle = ca({ + params: { + requestsPerSecond: { + type: 'number', + required: true, + name: 'requests_per_second' + } + }, + url: { + fmt: '/_delete_by_query/<%=taskId%>/_rethrottle', + req: { + taskId: { + type: 'string' + } + } + }, + method: 'POST' +}); + /** * Perform a [deleteScript](https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html) request * @@ -2761,25 +2787,11 @@ api.indices = namespace(); * * @param {Object} params - An object with parameters used to carry out this action * @param {<>} params.index - The name of the index to scope the operation - * @param {<>} params.preferLocal - With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true) - * @param {<>} [params.format=detailed] - Format of the output */ api.indices.prototype.analyze = ca({ params: { index: { type: 'string' - }, - preferLocal: { - type: 'boolean', - name: 'prefer_local' - }, - format: { - type: 'enum', - 'default': 'detailed', - options: [ - 'detailed', - 'text' - ] } }, urls: [ @@ -3442,6 +3454,7 @@ api.indices.prototype.forcemerge = ca({ * @param {<>} [params.expandWildcards=open] - Whether wildcard expressions should get expanded to open or closed indices (default: open) * @param {<>} params.flatSettings - Return settings in flat format (default: false) * @param {<>} params.includeDefaults - Whether to return all default setting for each of the indices. + * @param {<>} params.masterTimeout - Specify timeout for connection to master * @param {<>, <>, <>} params.index - A comma-separated list of index names */ api.indices.prototype.get = ca({ @@ -3476,6 +3489,10 @@ api.indices.prototype.get = ca({ type: 'boolean', 'default': false, name: 'include_defaults' + }, + masterTimeout: { + type: 'time', + name: 'master_timeout' } }, url: { @@ -5034,6 +5051,7 @@ api.mget = ca({ * @param {<>} params.maxConcurrentSearches - Controls the maximum number of concurrent searches the multi search api will execute * @param {<>} params.typedKeys - Specify whether aggregation and suggester names should be prefixed by their respective types in the response * @param {<>} [params.preFilterShardSize=128] - A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. + * @param {<>} [params.maxConcurrentShardRequests=The default grows with the number of nodes in the cluster but is at most 256.] - The number of concurrent shard requests each sub search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests * @param {<>, <>, <>} params.index - A comma-separated list of index names to use as default * @param {<>, <>, <>} params.type - A comma-separated list of document types to use as default */ @@ -5061,6 +5079,11 @@ api.msearch = ca({ type: 'number', 'default': 128, name: 'pre_filter_shard_size' + }, + maxConcurrentShardRequests: { + type: 'number', + 'default': 'The default grows with the number of nodes in the cluster but is at most 256.', + name: 'max_concurrent_shard_requests' } }, urls: [ @@ -5397,6 +5420,35 @@ api.nodes.prototype.info = ca({ ] }); +/** + * Perform a [nodes.reloadSecureSettings](https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-reload-secure-settings.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.timeout - Explicit operation timeout + * @param {<>, <>, <>} params.nodeId - A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes. + */ +api.nodes.prototype.reloadSecureSettings = ca({ + params: { + timeout: { + type: 'time' + } + }, + urls: [ + { + fmt: '/_nodes/<%=nodeId%>/reload_secure_settings', + req: { + nodeId: { + type: 'list' + } + } + }, + { + fmt: '/_nodes/reload_secure_settings' + } + ], + method: 'POST' +}); + /** * Perform a [nodes.stats](https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html) request * @@ -7163,3 +7215,29 @@ api.updateByQuery = ca({ ], method: 'POST' }); + +/** + * Perform a [updateByQueryRethrottle](https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {<>} params.requestsPerSecond - The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. + * @param {<>} params.taskId - The task id to rethrottle + */ +api.updateByQueryRethrottle = ca({ + params: { + requestsPerSecond: { + type: 'number', + required: true, + name: 'requests_per_second' + } + }, + url: { + fmt: '/_update_by_query/<%=taskId%>/_rethrottle', + req: { + taskId: { + type: 'string' + } + } + }, + method: 'POST' +});