From b0105d048ab531cfdb90df457b66934ac2003391 Mon Sep 17 00:00:00 2001 From: spalger Date: Tue, 15 Nov 2016 11:59:21 -0700 Subject: [PATCH] [api] regenerate --- docs/api_methods.asciidoc | 68 ++++----------- docs/api_methods_2_4.asciidoc | 2 + src/lib/apis/2_4.js | 4 + src/lib/apis/5_0.js | 152 +++++++++------------------------- src/lib/apis/5_x.js | 82 +++++++++--------- src/lib/apis/master.js | 92 ++++++++++---------- 6 files changed, 143 insertions(+), 257 deletions(-) diff --git a/docs/api_methods.asciidoc b/docs/api_methods.asciidoc index ae239287b..6a8918dcb 100644 --- a/docs/api_methods.asciidoc +++ b/docs/api_methods.asciidoc @@ -447,12 +447,6 @@ Options::: `df`:: `String` -- The field to use as default where no field prefix is given in the query string -`explain`:: -`Boolean` -- Specify whether to return detailed information about score computation as part of a hit -`storedFields`:: -`String, String[], Boolean` -- A comma-separated list of stored fields to return as part of a hit -`docvalueFields`:: -`String, String[], Boolean` -- A comma-separated list of fields to return as the docvalue representation of a field for each hit `from`:: `Number` -- Starting offset (default: 0) `ignoreUnavailable`:: @@ -507,29 +501,14 @@ Options::: `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`:: -`String` -- Specify which field to use for suggestions -`[suggestMode=missing]`:: -`String` -- Specify suggest mode -Options::: - * `"missing"` - * `"popular"` - * `"always"` - -`suggestSize`:: -`Number` -- How many suggestions to return in response -`suggestText`:: -`String` -- The source text for which the suggestions should be returned -`[timeout=1m]`:: -`Date, Number` -- Time each individual bulk request should wait for shards that are unavailable. -`trackScores`:: -`Boolean` -- Whether to calculate and return scores even if they are not used for sorting `version`:: `Boolean` -- Specify whether to return document version as part of a hit `requestCache`:: `Boolean` -- Specify if request cache should be used for this request or not, defaults to index level setting `refresh`:: `Boolean` -- Should the effected indexes be refreshed? +`[timeout=1m]`:: +`Date, Number` -- Time each individual bulk request should wait for shards that are unavailable. `waitForActiveShards`:: `String` -- Sets the number of shard copies that must be active before proceeding with the delete by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) `scrollSize`:: @@ -537,7 +516,7 @@ Options::: `waitForCompletion`:: `Boolean` -- Should the request should block until the delete-by-query is complete. `requestsPerSecond`:: -`Number` -- The throttle for this request in sub-requests per second. -1 means set no throttle. +`Number` -- The throttle to set on this request in sub-requests per second. -1 means set no throttle as does "unlimited" which is the only non-float this accepts. `index`:: `String, String[], Boolean` -- A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices `type`:: @@ -1099,6 +1078,8 @@ client.mget({ `Boolean` -- Specify whether to perform the operation in realtime or search mode `refresh`:: `Boolean` -- Refresh the shard containing the document before performing the operation +`routing`:: +`String` -- Specific routing value `_source`:: `String, String[], Boolean` -- True or false to return the _source field or not, or a list of fields to return `_sourceExclude`:: @@ -2166,14 +2147,6 @@ Options::: `df`:: `String` -- The field to use as default where no field prefix is given in the query string -`explain`:: -`Boolean` -- Specify whether to return detailed information about score computation as part of a hit -`storedFields`:: -`String, String[], Boolean` -- A comma-separated list of stored fields to return as part of a hit -`docvalueFields`:: -`String, String[], Boolean` -- A comma-separated list of fields to return as the docvalue representation of a field for each hit -`fielddataFields`:: -`String, String[], Boolean` -- A comma-separated list of fields to return as the docvalue representation of a field for each hit `from`:: `Number` -- Starting offset (default: 0) `ignoreUnavailable`:: @@ -2181,7 +2154,7 @@ Options::: `allowNoIndices`:: `Boolean` -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) `[conflicts=abort]`:: -`String` -- What to do when the reindex hits version conflicts? +`String` -- What to do when the update by query hits version conflicts? Options::: * `"abort"` * `"proceed"` @@ -2230,23 +2203,6 @@ Options::: `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`:: -`String` -- Specify which field to use for suggestions -`[suggestMode=missing]`:: -`String` -- Specify suggest mode -Options::: - * `"missing"` - * `"popular"` - * `"always"` - -`suggestSize`:: -`Number` -- How many suggestions to return in response -`suggestText`:: -`String` -- The source text for which the suggestions should be returned -`[timeout=1m]`:: -`Date, Number` -- Time each individual bulk request should wait for shards that are unavailable. -`trackScores`:: -`Boolean` -- Whether to calculate and return scores even if they are not used for sorting `version`:: `Boolean` -- Specify whether to return document version as part of a hit `versionType`:: @@ -2255,12 +2211,14 @@ Options::: `Boolean` -- Specify if request cache should be used for this request or not, defaults to index level setting `refresh`:: `Boolean` -- Should the effected indexes be refreshed? +`[timeout=1m]`:: +`Date, Number` -- Time each individual bulk request should wait for shards that are unavailable. `waitForActiveShards`:: `String` -- Sets the number of shard copies that must be active before proceeding with the update by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) `scrollSize`:: `Number` -- Size on the scroll request powering the update_by_query `waitForCompletion`:: -`Boolean` -- Should the request should block until the reindex is complete. +`Boolean` -- Should the request should block until the update by query operation is complete. `requestsPerSecond`:: `Number` -- The throttle to set on this request in sub-requests per second. -1 means set no throttle as does "unlimited" which is the only non-float this accepts. `index`:: @@ -2636,6 +2594,8 @@ The default method is `GET` and the usual <', + fmt: '/_cat/thread_pool/<%=threadPoolPatterns%>', req: { - threadPools: {} + threadPoolPatterns: { + type: 'list' + } } }, { @@ -1144,7 +1147,7 @@ api.cluster.prototype.getSettings = ca({ * @param {Date, Number} params.timeout - Explicit operation timeout * @param {String} params.waitForActiveShards - Wait until the specified number of shards is active * @param {String} params.waitForNodes - Wait until the specified number of nodes is available - * @param {String} params.waitForEvents - Wait until all currently queued events with the given priorty are processed + * @param {String} params.waitForEvents - Wait until all currently queued events with the given priority are processed * @param {Boolean} params.waitForNoRelocatingShards - Whether to wait until there are no relocating shards in the cluster * @param {String} params.waitForStatus - Wait until cluster is in a specific state * @param {String, String[], Boolean} params.index - Limit the information returned to a specific index @@ -1815,9 +1818,6 @@ api['delete'] = ca({ * @param {Boolean} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false) * @param {String} [params.defaultOperator=OR] - The default operator for query string query (AND or OR) * @param {String} params.df - The field to use as default where no field prefix is given in the query string - * @param {Boolean} params.explain - Specify whether to return detailed information about score computation as part of a hit - * @param {String, String[], Boolean} params.storedFields - A comma-separated list of stored fields to return as part of a hit - * @param {String, String[], Boolean} params.docvalueFields - A comma-separated list of fields to return as the docvalue representation of a field for each hit * @param {Number} params.from - Starting offset (default: 0) * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) @@ -1838,19 +1838,14 @@ api['delete'] = ca({ * @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 - * @param {Number} params.suggestSize - How many suggestions to return in response - * @param {String} params.suggestText - The source text for which the suggestions should be returned - * @param {Date, Number} [params.timeout=1m] - Time each individual bulk request should wait for shards that are unavailable. - * @param {Boolean} params.trackScores - Whether to calculate and return scores even if they are not used for sorting * @param {Boolean} params.version - Specify whether to return document version as part of a hit * @param {Boolean} params.requestCache - Specify if request cache should be used for this request or not, defaults to index level setting * @param {Boolean} params.refresh - Should the effected indexes be refreshed? + * @param {Date, Number} [params.timeout=1m] - Time each individual bulk request should wait for shards that are unavailable. * @param {String} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the delete by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) * @param {Number} params.scrollSize - Size on the scroll request powering the update_by_query * @param {Boolean} params.waitForCompletion - Should the request should block until the delete-by-query is complete. - * @param {Number} params.requestsPerSecond - The throttle for this request in sub-requests per second. -1 means set no throttle. + * @param {Number} params.requestsPerSecond - The throttle to set on this request in sub-requests per second. -1 means set no throttle as does "unlimited" which is the only non-float this accepts. * @param {String, String[], Boolean} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices * @param {String, String[], Boolean} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types */ @@ -1875,17 +1870,6 @@ api.deleteByQuery = ca({ df: { type: 'string' }, - explain: { - type: 'boolean' - }, - storedFields: { - type: 'list', - name: 'stored_fields' - }, - docvalueFields: { - type: 'list', - name: 'docvalue_fields' - }, from: { type: 'number' }, @@ -1971,36 +1955,6 @@ api.deleteByQuery = ca({ stats: { type: 'list' }, - suggestField: { - type: 'string', - name: 'suggest_field' - }, - suggestMode: { - type: 'enum', - 'default': 'missing', - options: [ - 'missing', - 'popular', - 'always' - ], - name: 'suggest_mode' - }, - suggestSize: { - type: 'number', - name: 'suggest_size' - }, - suggestText: { - type: 'string', - name: 'suggest_text' - }, - timeout: { - type: 'time', - 'default': '1m' - }, - trackScores: { - type: 'boolean', - name: 'track_scores' - }, version: { type: 'boolean' }, @@ -2011,6 +1965,10 @@ api.deleteByQuery = ca({ refresh: { type: 'boolean' }, + timeout: { + type: 'time', + 'default': '1m' + }, waitForActiveShards: { type: 'string', name: 'wait_for_active_shards' @@ -4152,6 +4110,7 @@ api.indices.prototype.refresh = ca({ * * @param {Object} params - An object with parameters used to carry out this action * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Boolean} params.dryRun - If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master * @param {String} params.waitForActiveShards - Set the number of active shards to wait for on the newly created rollover index before the operation returns. * @param {String} params.alias - The name of the alias to rollover @@ -4162,6 +4121,10 @@ api.indices.prototype.rollover = ca({ timeout: { type: 'time' }, + dryRun: { + type: 'boolean', + name: 'dry_run' + }, masterTimeout: { type: 'time', name: 'master_timeout' @@ -4500,6 +4463,7 @@ api.indices.prototype.updateAliases = ca({ * Perform a [indices.upgrade](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-upgrade.html) request * * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) * @param {Boolean} params.waitForCompletion - Specify whether the request should block until the all segments are upgraded (default: false) @@ -4508,6 +4472,10 @@ api.indices.prototype.updateAliases = ca({ */ api.indices.prototype.upgrade = ca({ params: { + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, expandWildcards: { type: 'enum', 'default': 'open', @@ -4795,6 +4763,7 @@ api.ingest.prototype.simulate = ca({ * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) * @param {Boolean} params.realtime - Specify whether to perform the operation in realtime or search mode * @param {Boolean} params.refresh - Refresh the shard containing the document before performing the operation + * @param {String} params.routing - Specific routing value * @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 @@ -4816,6 +4785,9 @@ api.mget = ca({ refresh: { type: 'boolean' }, + routing: { + type: 'string' + }, _source: { type: 'list' }, @@ -6839,14 +6811,10 @@ api.update = ca({ * @param {Boolean} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false) * @param {String} [params.defaultOperator=OR] - The default operator for query string query (AND or OR) * @param {String} params.df - The field to use as default where no field prefix is given in the query string - * @param {Boolean} params.explain - Specify whether to return detailed information about score computation as part of a hit - * @param {String, String[], Boolean} params.storedFields - A comma-separated list of stored fields to return as part of a hit - * @param {String, String[], Boolean} params.docvalueFields - A comma-separated list of fields to return as the docvalue representation of a field for each hit - * @param {String, String[], Boolean} params.fielddataFields - A comma-separated list of fields to return as the docvalue representation of a field for each hit * @param {Number} params.from - Starting offset (default: 0) * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * @param {String} [params.conflicts=abort] - What to do when the reindex hits version conflicts? + * @param {String} [params.conflicts=abort] - What to do when the update by query hits version conflicts? * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. * @param {Boolean} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored * @param {Boolean} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased @@ -6864,19 +6832,14 @@ api.update = ca({ * @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 - * @param {Number} params.suggestSize - How many suggestions to return in response - * @param {String} params.suggestText - The source text for which the suggestions should be returned - * @param {Date, Number} [params.timeout=1m] - Time each individual bulk request should wait for shards that are unavailable. - * @param {Boolean} params.trackScores - Whether to calculate and return scores even if they are not used for sorting * @param {Boolean} params.version - Specify whether to return document version as part of a hit * @param {Boolean} params.versionType - Should the document increment the version number (internal) on hit or not (reindex) * @param {Boolean} params.requestCache - Specify if request cache should be used for this request or not, defaults to index level setting * @param {Boolean} params.refresh - Should the effected indexes be refreshed? + * @param {Date, Number} [params.timeout=1m] - Time each individual bulk request should wait for shards that are unavailable. * @param {String} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the update by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) * @param {Number} params.scrollSize - Size on the scroll request powering the update_by_query - * @param {Boolean} params.waitForCompletion - Should the request should block until the reindex is complete. + * @param {Boolean} params.waitForCompletion - Should the request should block until the update by query operation is complete. * @param {Number} params.requestsPerSecond - The throttle to set on this request in sub-requests per second. -1 means set no throttle as does "unlimited" which is the only non-float this accepts. * @param {String, String[], Boolean} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices * @param {String, String[], Boolean} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types @@ -6902,21 +6865,6 @@ api.updateByQuery = ca({ df: { type: 'string' }, - explain: { - type: 'boolean' - }, - storedFields: { - type: 'list', - name: 'stored_fields' - }, - docvalueFields: { - type: 'list', - name: 'docvalue_fields' - }, - fielddataFields: { - type: 'list', - name: 'fielddata_fields' - }, from: { type: 'number' }, @@ -7005,36 +6953,6 @@ api.updateByQuery = ca({ stats: { type: 'list' }, - suggestField: { - type: 'string', - name: 'suggest_field' - }, - suggestMode: { - type: 'enum', - 'default': 'missing', - options: [ - 'missing', - 'popular', - 'always' - ], - name: 'suggest_mode' - }, - suggestSize: { - type: 'number', - name: 'suggest_size' - }, - suggestText: { - type: 'string', - name: 'suggest_text' - }, - timeout: { - type: 'time', - 'default': '1m' - }, - trackScores: { - type: 'boolean', - name: 'track_scores' - }, version: { type: 'boolean' }, @@ -7049,6 +6967,10 @@ api.updateByQuery = ca({ refresh: { type: 'boolean' }, + timeout: { + type: 'time', + 'default': '1m' + }, waitForActiveShards: { type: 'string', name: 'wait_for_active_shards' diff --git a/src/lib/apis/5_x.js b/src/lib/apis/5_x.js index 126b25c40..62ad76116 100644 --- a/src/lib/apis/5_x.js +++ b/src/lib/apis/5_x.js @@ -603,6 +603,7 @@ api.cat.prototype.nodeattrs = ca({ * * @param {Object} params - An object with parameters used to carry out this action * @param {String} params.format - a short version of the Accept header, e.g. json, yaml + * @param {Boolean} params.fullId - Return the full node ID instead of the shortened version (default: false) * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) * @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 @@ -615,6 +616,10 @@ api.cat.prototype.nodes = ca({ format: { type: 'string' }, + fullId: { + type: 'boolean', + name: 'full_id' + }, local: { type: 'boolean' }, @@ -1164,17 +1169,15 @@ api.cat.prototype.threadPool = ca({ v: { type: 'boolean', 'default': false - }, - threadPoolPatterns: { - type: 'list', - name: 'thread_pool_patterns' } }, urls: [ { - fmt: '/_cat/thread_pool/<%=threadPools%>', + fmt: '/_cat/thread_pool/<%=threadPoolPatterns%>', req: { - threadPools: {} + threadPoolPatterns: { + type: 'list' + } } }, { @@ -1275,7 +1278,7 @@ api.cluster.prototype.getSettings = ca({ * @param {Date, Number} params.timeout - Explicit operation timeout * @param {String} params.waitForActiveShards - Wait until the specified number of shards is active * @param {String} params.waitForNodes - Wait until the specified number of nodes is available - * @param {String} params.waitForEvents - Wait until all currently queued events with the given priorty are processed + * @param {String} params.waitForEvents - Wait until all currently queued events with the given priority are processed * @param {Boolean} params.waitForNoRelocatingShards - Whether to wait until there are no relocating shards in the cluster * @param {String} params.waitForStatus - Wait until cluster is in a specific state * @param {String, String[], Boolean} params.index - Limit the information returned to a specific index @@ -1597,7 +1600,6 @@ api.cluster.prototype.stats = ca({ * @param {String} [params.defaultOperator=OR] - The default operator for query string query (AND or OR) * @param {String} params.df - The field to use as default where no field prefix is given in the query string * @param {Boolean} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored - * @param {Boolean} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased * @param {String, String[], Boolean} params.index - A comma-separated list of indices to restrict the results * @param {String, String[], Boolean} params.type - A comma-separated list of types to restrict the results */ @@ -1656,10 +1658,6 @@ api.count = ca({ }, lenient: { type: 'boolean' - }, - lowercaseExpandedTerms: { - type: 'boolean', - name: 'lowercase_expanded_terms' } }, urls: [ @@ -1952,7 +1950,6 @@ api['delete'] = ca({ * @param {String} [params.conflicts=abort] - What to do when the delete-by-query hits version conflicts? * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. * @param {Boolean} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored - * @param {Boolean} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) * @param {String} params.q - Query in the Lucene query string syntax * @param {String, String[], Boolean} params.routing - A comma-separated list of specific routing values @@ -1973,7 +1970,8 @@ api['delete'] = ca({ * @param {String} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the delete by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) * @param {Number} params.scrollSize - Size on the scroll request powering the update_by_query * @param {Boolean} params.waitForCompletion - Should the request should block until the delete-by-query is complete. - * @param {Number} params.requestsPerSecond - The throttle to set on this request in sub-requests per second. -1 means set no throttle as does "unlimited" which is the only non-float this accepts. + * @param {Number} params.requestsPerSecond - The throttle for this request in sub-requests per second. -1 means no throttle. + * @param {Integer} [params.slices=1] - The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. * @param {String, String[], Boolean} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices * @param {String, String[], Boolean} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types */ @@ -2031,10 +2029,6 @@ api.deleteByQuery = ca({ lenient: { type: 'boolean' }, - lowercaseExpandedTerms: { - type: 'boolean', - name: 'lowercase_expanded_terms' - }, preference: { type: 'string' }, @@ -2114,6 +2108,10 @@ api.deleteByQuery = ca({ type: 'number', 'default': 0, name: 'requests_per_second' + }, + slices: { + type: 'integer', + 'default': 1 } }, urls: [ @@ -2239,7 +2237,6 @@ api.exists = ca({ * @param {String} params.df - The default field for query string query (default: _all) * @param {String, String[], Boolean} params.storedFields - A comma-separated list of stored fields to return in the response * @param {Boolean} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored - * @param {Boolean} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased * @param {String} params.parent - The ID of the parent document * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) * @param {String} params.q - Query in the Lucene query string syntax @@ -2279,10 +2276,6 @@ api.explain = ca({ lenient: { type: 'boolean' }, - lowercaseExpandedTerms: { - type: 'boolean', - name: 'lowercase_expanded_terms' - }, parent: { type: 'string' }, @@ -4238,6 +4231,7 @@ api.indices.prototype.refresh = ca({ * * @param {Object} params - An object with parameters used to carry out this action * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Boolean} params.dryRun - If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master * @param {String} params.waitForActiveShards - Set the number of active shards to wait for on the newly created rollover index before the operation returns. * @param {String} params.alias - The name of the alias to rollover @@ -4248,6 +4242,10 @@ api.indices.prototype.rollover = ca({ timeout: { type: 'time' }, + dryRun: { + type: 'boolean', + name: 'dry_run' + }, masterTimeout: { type: 'time', name: 'master_timeout' @@ -4586,6 +4584,7 @@ api.indices.prototype.updateAliases = ca({ * Perform a [indices.upgrade](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-upgrade.html) request * * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) * @param {Boolean} params.waitForCompletion - Specify whether the request should block until the all segments are upgraded (default: false) @@ -4594,6 +4593,10 @@ api.indices.prototype.updateAliases = ca({ */ api.indices.prototype.upgrade = ca({ params: { + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, expandWildcards: { type: 'enum', 'default': 'open', @@ -4649,7 +4652,6 @@ api.indices.prototype.upgrade = ca({ * @param {String} [params.defaultOperator=OR] - The default operator for query string query (AND or OR) * @param {String} params.df - The field to use as default where no field prefix is given in the query string * @param {Boolean} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored - * @param {Boolean} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased * @param {Boolean} params.rewrite - Provide a more detailed explanation showing the actual Lucene query that will be executed. * @param {String, String[], Boolean} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices * @param {String, String[], Boolean} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types @@ -4706,10 +4708,6 @@ api.indices.prototype.validateQuery = ca({ lenient: { type: 'boolean' }, - lowercaseExpandedTerms: { - type: 'boolean', - name: 'lowercase_expanded_terms' - }, rewrite: { type: 'boolean' } @@ -4881,6 +4879,7 @@ api.ingest.prototype.simulate = ca({ * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) * @param {Boolean} params.realtime - Specify whether to perform the operation in realtime or search mode * @param {Boolean} params.refresh - Refresh the shard containing the document before performing the operation + * @param {String} params.routing - Specific routing value * @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 @@ -4902,6 +4901,9 @@ api.mget = ca({ refresh: { type: 'boolean' }, + routing: { + type: 'string' + }, _source: { type: 'list' }, @@ -5736,7 +5738,8 @@ api.putTemplate = ca({ * @param {Date, Number} [params.timeout=1m] - Time each individual bulk request should wait for shards that are unavailable. * @param {String} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the reindex operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) * @param {Boolean} params.waitForCompletion - Should the request should block until the reindex is complete. - * @param {Number} params.requestsPerSecond - The throttle to set on this request in sub-requests per second. -1 means set no throttle as does "unlimited" which is the only non-float this accepts. + * @param {Number} params.requestsPerSecond - The throttle to set on this request in sub-requests per second. -1 means no throttle. + * @param {Integer} [params.slices=1] - The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. */ api.reindex = ca({ params: { @@ -5760,6 +5763,10 @@ api.reindex = ca({ type: 'number', 'default': 0, name: 'requests_per_second' + }, + slices: { + type: 'integer', + 'default': 1 } }, url: { @@ -5869,7 +5876,6 @@ api.scroll = ca({ * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. * @param {Boolean} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored - * @param {Boolean} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) * @param {String} params.q - Query in the Lucene query string syntax * @param {String, String[], Boolean} params.routing - A comma-separated list of specific routing values @@ -5954,10 +5960,6 @@ api.search = ca({ lenient: { type: 'boolean' }, - lowercaseExpandedTerms: { - type: 'boolean', - name: 'lowercase_expanded_terms' - }, preference: { type: 'string' }, @@ -6939,7 +6941,6 @@ api.update = ca({ * @param {String} [params.conflicts=abort] - What to do when the update by query hits version conflicts? * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. * @param {Boolean} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored - * @param {Boolean} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased * @param {String} params.pipeline - Ingest pipeline to set on index requests made by this action. (default: none) * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) * @param {String} params.q - Query in the Lucene query string syntax @@ -6962,7 +6963,8 @@ api.update = ca({ * @param {String} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the update by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) * @param {Number} params.scrollSize - Size on the scroll request powering the update_by_query * @param {Boolean} params.waitForCompletion - Should the request should block until the update by query operation is complete. - * @param {Number} params.requestsPerSecond - The throttle to set on this request in sub-requests per second. -1 means set no throttle as does "unlimited" which is the only non-float this accepts. + * @param {Number} params.requestsPerSecond - The throttle to set on this request in sub-requests per second. -1 means no throttle. + * @param {Integer} [params.slices=1] - The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. * @param {String, String[], Boolean} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices * @param {String, String[], Boolean} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types */ @@ -7020,10 +7022,6 @@ api.updateByQuery = ca({ lenient: { type: 'boolean' }, - lowercaseExpandedTerms: { - type: 'boolean', - name: 'lowercase_expanded_terms' - }, pipeline: { type: 'string' }, @@ -7110,6 +7108,10 @@ api.updateByQuery = ca({ type: 'number', 'default': 0, name: 'requests_per_second' + }, + slices: { + type: 'integer', + 'default': 1 } }, urls: [ diff --git a/src/lib/apis/master.js b/src/lib/apis/master.js index c6e4ca7d9..3930bd46e 100644 --- a/src/lib/apis/master.js +++ b/src/lib/apis/master.js @@ -603,6 +603,7 @@ api.cat.prototype.nodeattrs = ca({ * * @param {Object} params - An object with parameters used to carry out this action * @param {String} params.format - a short version of the Accept header, e.g. json, yaml + * @param {Boolean} params.fullId - Return the full node ID instead of the shortened version (default: false) * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) * @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 @@ -615,6 +616,10 @@ api.cat.prototype.nodes = ca({ format: { type: 'string' }, + fullId: { + type: 'boolean', + name: 'full_id' + }, local: { type: 'boolean' }, @@ -1164,17 +1169,15 @@ api.cat.prototype.threadPool = ca({ v: { type: 'boolean', 'default': false - }, - threadPoolPatterns: { - type: 'list', - name: 'thread_pool_patterns' } }, urls: [ { - fmt: '/_cat/thread_pool/<%=threadPools%>', + fmt: '/_cat/thread_pool/<%=threadPoolPatterns%>', req: { - threadPools: {} + threadPoolPatterns: { + type: 'list' + } } }, { @@ -1275,7 +1278,7 @@ api.cluster.prototype.getSettings = ca({ * @param {Date, Number} params.timeout - Explicit operation timeout * @param {String} params.waitForActiveShards - Wait until the specified number of shards is active * @param {String} params.waitForNodes - Wait until the specified number of nodes is available - * @param {String} params.waitForEvents - Wait until all currently queued events with the given priorty are processed + * @param {String} params.waitForEvents - Wait until all currently queued events with the given priority are processed * @param {Boolean} params.waitForNoRelocatingShards - Whether to wait until there are no relocating shards in the cluster * @param {String} params.waitForStatus - Wait until cluster is in a specific state * @param {String, String[], Boolean} params.index - Limit the information returned to a specific index @@ -1597,7 +1600,6 @@ api.cluster.prototype.stats = ca({ * @param {String} [params.defaultOperator=OR] - The default operator for query string query (AND or OR) * @param {String} params.df - The field to use as default where no field prefix is given in the query string * @param {Boolean} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored - * @param {Boolean} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased * @param {String, String[], Boolean} params.index - A comma-separated list of indices to restrict the results * @param {String, String[], Boolean} params.type - A comma-separated list of types to restrict the results */ @@ -1656,10 +1658,6 @@ api.count = ca({ }, lenient: { type: 'boolean' - }, - lowercaseExpandedTerms: { - type: 'boolean', - name: 'lowercase_expanded_terms' } }, urls: [ @@ -1952,7 +1950,6 @@ api['delete'] = ca({ * @param {String} [params.conflicts=abort] - What to do when the delete-by-query hits version conflicts? * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. * @param {Boolean} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored - * @param {Boolean} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) * @param {String} params.q - Query in the Lucene query string syntax * @param {String, String[], Boolean} params.routing - A comma-separated list of specific routing values @@ -1973,7 +1970,8 @@ api['delete'] = ca({ * @param {String} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the delete by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) * @param {Number} params.scrollSize - Size on the scroll request powering the update_by_query * @param {Boolean} params.waitForCompletion - Should the request should block until the delete-by-query is complete. - * @param {Number} params.requestsPerSecond - The throttle to set on this request in sub-requests per second. -1 means set no throttle as does "unlimited" which is the only non-float this accepts. + * @param {Number} params.requestsPerSecond - The throttle for this request in sub-requests per second. -1 means no throttle. + * @param {Integer} [params.slices=1] - The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. * @param {String, String[], Boolean} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices * @param {String, String[], Boolean} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types */ @@ -2031,10 +2029,6 @@ api.deleteByQuery = ca({ lenient: { type: 'boolean' }, - lowercaseExpandedTerms: { - type: 'boolean', - name: 'lowercase_expanded_terms' - }, preference: { type: 'string' }, @@ -2114,6 +2108,10 @@ api.deleteByQuery = ca({ type: 'number', 'default': 0, name: 'requests_per_second' + }, + slices: { + type: 'integer', + 'default': 1 } }, urls: [ @@ -2239,7 +2237,6 @@ api.exists = ca({ * @param {String} params.df - The default field for query string query (default: _all) * @param {String, String[], Boolean} params.storedFields - A comma-separated list of stored fields to return in the response * @param {Boolean} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored - * @param {Boolean} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased * @param {String} params.parent - The ID of the parent document * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) * @param {String} params.q - Query in the Lucene query string syntax @@ -2279,10 +2276,6 @@ api.explain = ca({ lenient: { type: 'boolean' }, - lowercaseExpandedTerms: { - type: 'boolean', - name: 'lowercase_expanded_terms' - }, parent: { type: 'string' }, @@ -2989,22 +2982,12 @@ api.indices.prototype.deleteTemplate = ca({ * Perform a [indices.exists](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html) request * * @param {Object} params - An object with parameters used to carry out this action - * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) - * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) * @param {String, String[], Boolean} params.index - A comma-separated list of indices to check */ api.indices.prototype.exists = ca({ params: { - ignoreUnavailable: { - type: 'boolean', - name: 'ignore_unavailable' - }, - allowNoIndices: { - type: 'boolean', - name: 'allow_no_indices' - }, expandWildcards: { type: 'enum', 'default': 'open', @@ -4205,6 +4188,7 @@ api.indices.prototype.refresh = ca({ * * @param {Object} params - An object with parameters used to carry out this action * @param {Date, Number} params.timeout - Explicit operation timeout + * @param {Boolean} params.dryRun - If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master * @param {String} params.waitForActiveShards - Set the number of active shards to wait for on the newly created rollover index before the operation returns. * @param {String} params.alias - The name of the alias to rollover @@ -4215,6 +4199,10 @@ api.indices.prototype.rollover = ca({ timeout: { type: 'time' }, + dryRun: { + type: 'boolean', + name: 'dry_run' + }, masterTimeout: { type: 'time', name: 'master_timeout' @@ -4553,6 +4541,7 @@ api.indices.prototype.updateAliases = ca({ * Perform a [indices.upgrade](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html) request * * @param {Object} params - An object with parameters used to carry out this action + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) * @param {Boolean} params.waitForCompletion - Specify whether the request should block until the all segments are upgraded (default: false) @@ -4561,6 +4550,10 @@ api.indices.prototype.updateAliases = ca({ */ api.indices.prototype.upgrade = ca({ params: { + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, expandWildcards: { type: 'enum', 'default': 'open', @@ -4616,7 +4609,6 @@ api.indices.prototype.upgrade = ca({ * @param {String} [params.defaultOperator=OR] - The default operator for query string query (AND or OR) * @param {String} params.df - The field to use as default where no field prefix is given in the query string * @param {Boolean} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored - * @param {Boolean} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased * @param {Boolean} params.rewrite - Provide a more detailed explanation showing the actual Lucene query that will be executed. * @param {String, String[], Boolean} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices * @param {String, String[], Boolean} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types @@ -4673,10 +4665,6 @@ api.indices.prototype.validateQuery = ca({ lenient: { type: 'boolean' }, - lowercaseExpandedTerms: { - type: 'boolean', - name: 'lowercase_expanded_terms' - }, rewrite: { type: 'boolean' } @@ -4848,6 +4836,7 @@ api.ingest.prototype.simulate = ca({ * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) * @param {Boolean} params.realtime - Specify whether to perform the operation in realtime or search mode * @param {Boolean} params.refresh - Refresh the shard containing the document before performing the operation + * @param {String} params.routing - Specific routing value * @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 @@ -4869,6 +4858,9 @@ api.mget = ca({ refresh: { type: 'boolean' }, + routing: { + type: 'string' + }, _source: { type: 'list' }, @@ -5703,7 +5695,8 @@ api.putTemplate = ca({ * @param {Date, Number} [params.timeout=1m] - Time each individual bulk request should wait for shards that are unavailable. * @param {String} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the reindex operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) * @param {Boolean} params.waitForCompletion - Should the request should block until the reindex is complete. - * @param {Number} params.requestsPerSecond - The throttle to set on this request in sub-requests per second. -1 means set no throttle as does "unlimited" which is the only non-float this accepts. + * @param {Number} params.requestsPerSecond - The throttle to set on this request in sub-requests per second. -1 means no throttle. + * @param {Integer} [params.slices=1] - The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. */ api.reindex = ca({ params: { @@ -5727,6 +5720,10 @@ api.reindex = ca({ type: 'number', 'default': 0, name: 'requests_per_second' + }, + slices: { + type: 'integer', + 'default': 1 } }, url: { @@ -5836,7 +5833,6 @@ api.scroll = ca({ * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. * @param {Boolean} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored - * @param {Boolean} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) * @param {String} params.q - Query in the Lucene query string syntax * @param {String, String[], Boolean} params.routing - A comma-separated list of specific routing values @@ -5921,10 +5917,6 @@ api.search = ca({ lenient: { type: 'boolean' }, - lowercaseExpandedTerms: { - type: 'boolean', - name: 'lowercase_expanded_terms' - }, preference: { type: 'string' }, @@ -6906,7 +6898,6 @@ api.update = ca({ * @param {String} [params.conflicts=abort] - What to do when the update by query hits version conflicts? * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. * @param {Boolean} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored - * @param {Boolean} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased * @param {String} params.pipeline - Ingest pipeline to set on index requests made by this action. (default: none) * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) * @param {String} params.q - Query in the Lucene query string syntax @@ -6929,7 +6920,8 @@ api.update = ca({ * @param {String} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the update by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) * @param {Number} params.scrollSize - Size on the scroll request powering the update_by_query * @param {Boolean} params.waitForCompletion - Should the request should block until the update by query operation is complete. - * @param {Number} params.requestsPerSecond - The throttle to set on this request in sub-requests per second. -1 means set no throttle as does "unlimited" which is the only non-float this accepts. + * @param {Number} params.requestsPerSecond - The throttle to set on this request in sub-requests per second. -1 means no throttle. + * @param {Integer} [params.slices=1] - The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. * @param {String, String[], Boolean} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices * @param {String, String[], Boolean} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types */ @@ -6987,10 +6979,6 @@ api.updateByQuery = ca({ lenient: { type: 'boolean' }, - lowercaseExpandedTerms: { - type: 'boolean', - name: 'lowercase_expanded_terms' - }, pipeline: { type: 'string' }, @@ -7077,6 +7065,10 @@ api.updateByQuery = ca({ type: 'number', 'default': 0, name: 'requests_per_second' + }, + slices: { + type: 'integer', + 'default': 1 } }, urls: [