From f037e8115ecc96ee08a60b19bcf489031070c7f7 Mon Sep 17 00:00:00 2001 From: Tomas Della Vedova Date: Tue, 11 Jun 2019 21:02:36 +0200 Subject: [PATCH] API generation (#875) --- api/api/count.js | 10 +----- api/api/create.js | 2 -- api/api/delete.js | 2 -- api/api/delete_by_query.js | 5 ++- api/api/exists.js | 2 -- api/api/exists_source.js | 2 -- api/api/explain.js | 2 -- api/api/get.js | 2 -- api/api/get_source.js | 2 -- api/api/index.js | 2 -- api/api/ml.find_file_structure.js | 3 ++ api/api/msearch.js | 2 +- api/api/mtermvectors.js | 2 -- api/api/reindex.js | 3 ++ api/api/termvectors.js | 2 -- api/api/update.js | 2 -- api/api/update_by_query.js | 5 ++- api/requestParams.d.ts | 15 +++------ docs/reference.asciidoc | 56 ++++++++++--------------------- 19 files changed, 38 insertions(+), 83 deletions(-) diff --git a/api/api/count.js b/api/api/count.js index c4559bcd3..3ab8ebadb 100644 --- a/api/api/count.js +++ b/api/api/count.js @@ -94,12 +94,6 @@ function buildCount (opts) { options = {} } - // check required url components - if (params['type'] != null && (params['index'] == null)) { - const err = new ConfigurationError('Missing required parameter of the url: index') - return handleError(err, callback) - } - // validate headers object if (options.headers != null && typeof options.headers !== 'object') { const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`) @@ -121,9 +115,7 @@ function buildCount (opts) { var path = '' - if ((index) != null && (type) != null) { - path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_count' - } else if ((index) != null) { + if ((index) != null) { path = '/' + encodeURIComponent(index) + '/' + '_count' } else { path = '/' + '_count' diff --git a/api/api/create.js b/api/api/create.js index 2c5c20dbd..c1480fbea 100644 --- a/api/api/create.js +++ b/api/api/create.js @@ -32,7 +32,6 @@ function buildCreate (opts) { * @param {string} index - The name of the index * @param {string} type - The type of the document * @param {string} wait_for_active_shards - Sets the number of shard copies that must be active before proceeding with the index 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 {string} parent - ID of the parent document * @param {enum} refresh - If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. * @param {string} routing - Specific routing value * @param {time} timeout - Explicit operation timeout @@ -44,7 +43,6 @@ function buildCreate (opts) { const acceptedQuerystring = [ 'wait_for_active_shards', - 'parent', 'refresh', 'routing', 'timeout', diff --git a/api/api/delete.js b/api/api/delete.js index 1a02977e2..8055d48d3 100644 --- a/api/api/delete.js +++ b/api/api/delete.js @@ -32,7 +32,6 @@ function buildDelete (opts) { * @param {string} index - The name of the index * @param {string} type - The type of the document * @param {string} wait_for_active_shards - Sets the number of shard copies that must be active before proceeding with the delete 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 {string} parent - ID of parent document * @param {enum} refresh - If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. * @param {string} routing - Specific routing value * @param {time} timeout - Explicit operation timeout @@ -44,7 +43,6 @@ function buildDelete (opts) { const acceptedQuerystring = [ 'wait_for_active_shards', - 'parent', 'refresh', 'routing', 'timeout', diff --git a/api/api/delete_by_query.js b/api/api/delete_by_query.js index 8450c1eb2..1283cf659 100644 --- a/api/api/delete_by_query.js +++ b/api/api/delete_by_query.js @@ -45,7 +45,8 @@ function buildDeleteByQuery (opts) { * @param {time} scroll - Specify how long a consistent view of the index should be maintained for scrolled search * @param {enum} search_type - Search operation type * @param {time} search_timeout - Explicit timeout for each search request. Defaults to no timeout. - * @param {number} size - Number of hits to return (default: 10) + * @param {number} size - Deprecated, please use `max_docs` instead + * @param {number} max_docs - Maximum number of documents to process (default: all documents) * @param {list} sort - A comma-separated list of : pairs * @param {list} _source - True or false to return the _source field or not, or a list of fields to return * @param {list} _source_excludes - A list of fields to exclude from the returned _source field @@ -82,6 +83,7 @@ function buildDeleteByQuery (opts) { 'search_type', 'search_timeout', 'size', + 'max_docs', 'sort', '_source', '_source_excludes', @@ -114,6 +116,7 @@ function buildDeleteByQuery (opts) { expandWildcards: 'expand_wildcards', searchType: 'search_type', searchTimeout: 'search_timeout', + maxDocs: 'max_docs', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', diff --git a/api/api/exists.js b/api/api/exists.js index 41128f83e..4ee50bdfa 100644 --- a/api/api/exists.js +++ b/api/api/exists.js @@ -32,7 +32,6 @@ function buildExists (opts) { * @param {string} index - The name of the index * @param {string} type - The type of the document (use `_all` to fetch the first document matching the ID across all types) * @param {list} stored_fields - A comma-separated list of stored fields to return in the response - * @param {string} parent - The ID of the parent document * @param {string} preference - Specify the node or shard the operation should be performed on (default: random) * @param {boolean} realtime - Specify whether to perform the operation in realtime or search mode * @param {boolean} refresh - Refresh the shard containing the document before performing the operation @@ -46,7 +45,6 @@ function buildExists (opts) { const acceptedQuerystring = [ 'stored_fields', - 'parent', 'preference', 'realtime', 'refresh', diff --git a/api/api/exists_source.js b/api/api/exists_source.js index 7eece25e5..8d1b4d31a 100644 --- a/api/api/exists_source.js +++ b/api/api/exists_source.js @@ -31,7 +31,6 @@ function buildExistsSource (opts) { * @param {string} id - The document ID * @param {string} index - The name of the index * @param {string} type - The type of the document; deprecated and optional starting with 7.0 - * @param {string} parent - The ID of the parent document * @param {string} preference - Specify the node or shard the operation should be performed on (default: random) * @param {boolean} realtime - Specify whether to perform the operation in realtime or search mode * @param {boolean} refresh - Refresh the shard containing the document before performing the operation @@ -44,7 +43,6 @@ function buildExistsSource (opts) { */ const acceptedQuerystring = [ - 'parent', 'preference', 'realtime', 'refresh', diff --git a/api/api/explain.js b/api/api/explain.js index 1f6602e79..243b9f248 100644 --- a/api/api/explain.js +++ b/api/api/explain.js @@ -37,7 +37,6 @@ function buildExplain (opts) { * @param {string} df - The default field for query string query (default: _all) * @param {list} stored_fields - A comma-separated list of stored fields to return in the response * @param {boolean} lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored - * @param {string} parent - The ID of the parent document * @param {string} preference - Specify the node or shard the operation should be performed on (default: random) * @param {string} q - Query in the Lucene query string syntax * @param {string} routing - Specific routing value @@ -54,7 +53,6 @@ function buildExplain (opts) { 'df', 'stored_fields', 'lenient', - 'parent', 'preference', 'q', 'routing', diff --git a/api/api/get.js b/api/api/get.js index 670668dc6..8f6e6300b 100644 --- a/api/api/get.js +++ b/api/api/get.js @@ -32,7 +32,6 @@ function buildGet (opts) { * @param {string} index - The name of the index * @param {string} type - The type of the document (use `_all` to fetch the first document matching the ID across all types) * @param {list} stored_fields - A comma-separated list of stored fields to return in the response - * @param {string} parent - The ID of the parent document * @param {string} preference - Specify the node or shard the operation should be performed on (default: random) * @param {boolean} realtime - Specify whether to perform the operation in realtime or search mode * @param {boolean} refresh - Refresh the shard containing the document before performing the operation @@ -46,7 +45,6 @@ function buildGet (opts) { const acceptedQuerystring = [ 'stored_fields', - 'parent', 'preference', 'realtime', 'refresh', diff --git a/api/api/get_source.js b/api/api/get_source.js index e9f0491c1..40e21e431 100644 --- a/api/api/get_source.js +++ b/api/api/get_source.js @@ -31,7 +31,6 @@ function buildGetSource (opts) { * @param {string} id - The document ID * @param {string} index - The name of the index * @param {string} type - The type of the document; deprecated and optional starting with 7.0 - * @param {string} parent - The ID of the parent document * @param {string} preference - Specify the node or shard the operation should be performed on (default: random) * @param {boolean} realtime - Specify whether to perform the operation in realtime or search mode * @param {boolean} refresh - Refresh the shard containing the document before performing the operation @@ -44,7 +43,6 @@ function buildGetSource (opts) { */ const acceptedQuerystring = [ - 'parent', 'preference', 'realtime', 'refresh', diff --git a/api/api/index.js b/api/api/index.js index 4dbb666d9..c012359b3 100644 --- a/api/api/index.js +++ b/api/api/index.js @@ -33,7 +33,6 @@ function buildIndex (opts) { * @param {string} type - The type of the document * @param {string} wait_for_active_shards - Sets the number of shard copies that must be active before proceeding with the index 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 {enum} op_type - Explicit operation type - * @param {string} parent - ID of the parent document * @param {enum} refresh - If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. * @param {string} routing - Specific routing value * @param {time} timeout - Explicit operation timeout @@ -48,7 +47,6 @@ function buildIndex (opts) { const acceptedQuerystring = [ 'wait_for_active_shards', 'op_type', - 'parent', 'refresh', 'routing', 'timeout', diff --git a/api/api/ml.find_file_structure.js b/api/api/ml.find_file_structure.js index eee5b0e56..6371e36a6 100644 --- a/api/api/ml.find_file_structure.js +++ b/api/api/ml.find_file_structure.js @@ -29,6 +29,7 @@ function buildMlFindFileStructure (opts) { * Perform a [ml.find_file_structure](http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-find-file-structure.html) request * * @param {int} lines_to_sample - How many lines of the file should be included in the analysis + * @param {int} line_merge_size_limit - Maximum number of characters permitted in a single message when lines are merged to create messages. * @param {time} timeout - Timeout after which the analysis will be aborted * @param {string} charset - Optional parameter to specify the character set of the file * @param {enum} format - Optional parameter to specify the high level file format @@ -46,6 +47,7 @@ function buildMlFindFileStructure (opts) { const acceptedQuerystring = [ 'lines_to_sample', + 'line_merge_size_limit', 'timeout', 'charset', 'format', @@ -62,6 +64,7 @@ function buildMlFindFileStructure (opts) { const snakeCase = { linesToSample: 'lines_to_sample', + lineMergeSizeLimit: 'line_merge_size_limit', hasHeaderRow: 'has_header_row', columnNames: 'column_names', shouldTrimFields: 'should_trim_fields', diff --git a/api/api/msearch.js b/api/api/msearch.js index fd1c89a06..ead9e13b5 100644 --- a/api/api/msearch.js +++ b/api/api/msearch.js @@ -33,7 +33,7 @@ function buildMsearch (opts) { * @param {number} max_concurrent_searches - Controls the maximum number of concurrent searches the multi search api will execute * @param {boolean} typed_keys - Specify whether aggregation and suggester names should be prefixed by their respective types in the response * @param {number} pre_filter_shard_size - 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 {number} max_concurrent_shard_requests - 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 {number} max_concurrent_shard_requests - The number of concurrent shard requests each sub search executes concurrently per node. 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 {boolean} rest_total_hits_as_int - Indicates whether hits.total should be rendered as an integer or an object in the rest search response * @param {boolean} ccs_minimize_roundtrips - Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution * @param {object} body - The request definitions (metadata-search request definition pairs), separated by newlines diff --git a/api/api/mtermvectors.js b/api/api/mtermvectors.js index 4fee48798..8462fd231 100644 --- a/api/api/mtermvectors.js +++ b/api/api/mtermvectors.js @@ -38,7 +38,6 @@ function buildMtermvectors (opts) { * @param {boolean} payloads - Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". * @param {string} preference - Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs". * @param {string} routing - Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs". - * @param {string} parent - Parent id of documents. Applies to all returned documents unless otherwise specified in body "params" or "docs". * @param {boolean} realtime - Specifies if requests are real-time as opposed to near-real-time (default: true). * @param {number} version - Explicit version number for concurrency control * @param {enum} version_type - Specific version type @@ -55,7 +54,6 @@ function buildMtermvectors (opts) { 'payloads', 'preference', 'routing', - 'parent', 'realtime', 'version', 'version_type', diff --git a/api/api/reindex.js b/api/api/reindex.js index 85722b4ce..812a88bd4 100644 --- a/api/api/reindex.js +++ b/api/api/reindex.js @@ -35,6 +35,7 @@ function buildReindex (opts) { * @param {number} requests_per_second - The throttle to set on this request in sub-requests per second. -1 means no throttle. * @param {time} scroll - Control how long to keep the search context alive * @param {number} slices - The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. + * @param {number} max_docs - Maximum number of documents to process (default: all documents) * @param {object} body - The search definition using the Query DSL and the prototype for the index request. */ @@ -46,6 +47,7 @@ function buildReindex (opts) { 'requests_per_second', 'scroll', 'slices', + 'max_docs', 'pretty', 'human', 'error_trace', @@ -57,6 +59,7 @@ function buildReindex (opts) { waitForActiveShards: 'wait_for_active_shards', waitForCompletion: 'wait_for_completion', requestsPerSecond: 'requests_per_second', + maxDocs: 'max_docs', errorTrace: 'error_trace', filterPath: 'filter_path' } diff --git a/api/api/termvectors.js b/api/api/termvectors.js index 47c0ae4ea..445d13d85 100644 --- a/api/api/termvectors.js +++ b/api/api/termvectors.js @@ -38,7 +38,6 @@ function buildTermvectors (opts) { * @param {boolean} payloads - Specifies if term payloads should be returned. * @param {string} preference - Specify the node or shard the operation should be performed on (default: random). * @param {string} routing - Specific routing value. - * @param {string} parent - Parent id of documents. * @param {boolean} realtime - Specifies if request is real-time as opposed to near-real-time (default: true). * @param {number} version - Explicit version number for concurrency control * @param {enum} version_type - Specific version type @@ -54,7 +53,6 @@ function buildTermvectors (opts) { 'payloads', 'preference', 'routing', - 'parent', 'realtime', 'version', 'version_type', diff --git a/api/api/update.js b/api/api/update.js index 8059d3cb1..6130b7aa4 100644 --- a/api/api/update.js +++ b/api/api/update.js @@ -36,7 +36,6 @@ function buildUpdate (opts) { * @param {list} _source_excludes - A list of fields to exclude from the returned _source field * @param {list} _source_includes - A list of fields to extract and return from the _source field * @param {string} lang - The script language (default: painless) - * @param {string} parent - ID of the parent document. Is is only used for routing and when for the upsert request * @param {enum} refresh - If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. * @param {number} retry_on_conflict - Specify how many times should the operation be retried when a conflict occurs (default: 0) * @param {string} routing - Specific routing value @@ -54,7 +53,6 @@ function buildUpdate (opts) { '_source_includes', '_source_include', 'lang', - 'parent', 'refresh', 'retry_on_conflict', 'routing', diff --git a/api/api/update_by_query.js b/api/api/update_by_query.js index 017262d33..98aa3cfa0 100644 --- a/api/api/update_by_query.js +++ b/api/api/update_by_query.js @@ -46,7 +46,8 @@ function buildUpdateByQuery (opts) { * @param {time} scroll - Specify how long a consistent view of the index should be maintained for scrolled search * @param {enum} search_type - Search operation type * @param {time} search_timeout - Explicit timeout for each search request. Defaults to no timeout. - * @param {number} size - Number of hits to return (default: 10) + * @param {number} size - Deprecated, please use `max_docs` instead + * @param {number} max_docs - Maximum number of documents to process (default: all documents) * @param {list} sort - A comma-separated list of : pairs * @param {list} _source - True or false to return the _source field or not, or a list of fields to return * @param {list} _source_excludes - A list of fields to exclude from the returned _source field @@ -85,6 +86,7 @@ function buildUpdateByQuery (opts) { 'search_type', 'search_timeout', 'size', + 'max_docs', 'sort', '_source', '_source_excludes', @@ -118,6 +120,7 @@ function buildUpdateByQuery (opts) { expandWildcards: 'expand_wildcards', searchType: 'search_type', searchTimeout: 'search_timeout', + maxDocs: 'max_docs', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', diff --git a/api/requestParams.d.ts b/api/requestParams.d.ts index 3afecde48..32e92b517 100644 --- a/api/requestParams.d.ts +++ b/api/requestParams.d.ts @@ -362,7 +362,6 @@ export interface Create extends Generic { index: string; type?: string; wait_for_active_shards?: string; - parent?: string; refresh?: 'true' | 'false' | 'wait_for'; routing?: string; timeout?: string; @@ -377,7 +376,6 @@ export interface Delete extends Generic { index: string; type?: string; wait_for_active_shards?: string; - parent?: string; refresh?: 'true' | 'false' | 'wait_for'; routing?: string; timeout?: string; @@ -408,6 +406,7 @@ export interface DeleteByQuery extends Generic { search_type?: 'query_then_fetch' | 'dfs_query_then_fetch'; search_timeout?: string; size?: number; + max_docs?: number; sort?: string | string[]; _source?: string | string[]; _source_excludes?: string | string[]; @@ -444,7 +443,6 @@ export interface Exists extends Generic { _source_exclude?: string | string[]; _source_include?: string | string[]; stored_fields?: string | string[]; - parent?: string; preference?: string; realtime?: boolean; refresh?: boolean; @@ -462,7 +460,6 @@ export interface ExistsSource extends Generic { type?: string; _source_exclude?: string | string[]; _source_include?: string | string[]; - parent?: string; preference?: string; realtime?: boolean; refresh?: boolean; @@ -486,7 +483,6 @@ export interface Explain extends Generic { df?: string; stored_fields?: string | string[]; lenient?: boolean; - parent?: string; preference?: string; q?: string; routing?: string; @@ -512,7 +508,6 @@ export interface Get extends Generic { _source_exclude?: string | string[]; _source_include?: string | string[]; stored_fields?: string | string[]; - parent?: string; preference?: string; realtime?: boolean; refresh?: boolean; @@ -535,7 +530,6 @@ export interface GetSource extends Generic { type?: string; _source_exclude?: string | string[]; _source_include?: string | string[]; - parent?: string; preference?: string; realtime?: boolean; refresh?: boolean; @@ -553,7 +547,6 @@ export interface Index extends Generic { type?: string; wait_for_active_shards?: string; op_type?: 'index' | 'create'; - parent?: string; refresh?: 'true' | 'false' | 'wait_for'; routing?: string; timeout?: string; @@ -992,7 +985,6 @@ export interface Mtermvectors extends Generic { payloads?: boolean; preference?: string; routing?: string; - parent?: string; realtime?: boolean; version?: number; version_type?: 'internal' | 'external' | 'external_gte' | 'force'; @@ -1068,6 +1060,7 @@ export interface Reindex extends Generic { requests_per_second?: number; scroll?: string; slices?: number; + max_docs?: number; body: T; } @@ -1270,7 +1263,6 @@ export interface Termvectors extends Generic { payloads?: boolean; preference?: string; routing?: string; - parent?: string; realtime?: boolean; version?: number; version_type?: 'internal' | 'external' | 'external_gte' | 'force'; @@ -1288,7 +1280,6 @@ export interface Update extends Generic { _source_excludes?: string | string[]; _source_includes?: string | string[]; lang?: string; - parent?: string; refresh?: 'true' | 'false' | 'wait_for'; retry_on_conflict?: number; routing?: string; @@ -1320,6 +1311,7 @@ export interface UpdateByQuery extends Generic { search_type?: 'query_then_fetch' | 'dfs_query_then_fetch'; search_timeout?: string; size?: number; + max_docs?: number; sort?: string | string[]; _source?: string | string[]; _source_excludes?: string | string[]; @@ -1580,6 +1572,7 @@ export interface MlDeleteModelSnapshot extends Generic { export interface MlFindFileStructure extends Generic { lines_to_sample?: number; + line_merge_size_limit?: number; timeout?: string; charset?: string; format?: 'ndjson' | 'xml' | 'delimited' | 'semi_structured_text'; diff --git a/docs/reference.asciidoc b/docs/reference.asciidoc index d9f1a3eca..ed540b1c8 100644 --- a/docs/reference.asciidoc +++ b/docs/reference.asciidoc @@ -1077,9 +1077,6 @@ link:{ref}/docs-index_.html[Reference] |`wait_for_active_shards` or `waitForActiveShards` |`string` - Sets the number of shard copies that must be active before proceeding with the index 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) -|`parent` -|`string` - ID of the parent document - |`refresh` |`'true', 'false', 'wait_for'` - If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. @@ -1123,9 +1120,6 @@ link:{ref}/docs-delete.html[Reference] |`wait_for_active_shards` or `waitForActiveShards` |`string` - Sets the number of shard copies that must be active before proceeding with the delete 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) -|`parent` -|`string` - ID of parent document - |`refresh` |`'true', 'false', 'wait_for'` - If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. @@ -1212,7 +1206,10 @@ _Default:_ `open` |`string` - Explicit timeout for each search request. Defaults to no timeout. |`size` -|`number` - Number of hits to return (default: 10) +|`number` - Deprecated, please use `max_docs` instead + +|`max_docs` or `maxDocs` +|`number` - Maximum number of documents to process (default: all documents) |`sort` |`string, string[]` - A comma-separated list of : pairs @@ -1322,9 +1319,6 @@ link:{ref}/docs-get.html[Reference] |`stored_fields` or `storedFields` |`string, string[]` - A comma-separated list of stored fields to return in the response -|`parent` -|`string` - The ID of the parent document - |`preference` |`string` - Specify the node or shard the operation should be performed on (default: random) @@ -1371,9 +1365,6 @@ link:{ref}/docs-get.html[Reference] |`type` |`string` - The type of the document; deprecated and optional starting with 7.0 -|`parent` -|`string` - The ID of the parent document - |`preference` |`string` - Specify the node or shard the operation should be performed on (default: random) @@ -1439,9 +1430,6 @@ _Default:_ `OR` |`lenient` |`boolean` - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored -|`parent` -|`string` - The ID of the parent document - |`preference` |`string` - Specify the node or shard the operation should be performed on (default: random) @@ -1514,9 +1502,6 @@ link:{ref}/docs-get.html[Reference] |`stored_fields` or `storedFields` |`string, string[]` - A comma-separated list of stored fields to return in the response -|`parent` -|`string` - The ID of the parent document - |`preference` |`string` - Specify the node or shard the operation should be performed on (default: random) @@ -1579,9 +1564,6 @@ link:{ref}/docs-get.html[Reference] |`type` |`string` - The type of the document; deprecated and optional starting with 7.0 -|`parent` -|`string` - The ID of the parent document - |`preference` |`string` - Specify the node or shard the operation should be performed on (default: random) @@ -1635,9 +1617,6 @@ link:{ref}/docs-index_.html[Reference] |`'index', 'create'` - Explicit operation type + _Default:_ `index` -|`parent` -|`string` - ID of the parent document - |`refresh` |`'true', 'false', 'wait_for'` - If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. @@ -2941,8 +2920,8 @@ link:{ref}/search-multi-search.html[Reference] _Default:_ `128` |`max_concurrent_shard_requests` or `maxConcurrentShardRequests` -|`number` - 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 + -_Default:_ `The default grows with the number of nodes in the cluster but is at most 256.` +|`number` - The number of concurrent shard requests each sub search executes concurrently per node. 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 + +_Default:_ `5` |`rest_total_hits_as_int` or `restTotalHitsAsInt` |`boolean` - Indicates whether hits.total should be rendered as an integer or an object in the rest search response @@ -3030,9 +3009,6 @@ _Default:_ `true` |`routing` |`string` - Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs". -|`parent` -|`string` - Parent id of documents. Applies to all returned documents unless otherwise specified in body "params" or "docs". - |`realtime` |`boolean` - Specifies if requests are real-time as opposed to near-real-time (default: true). @@ -3274,6 +3250,9 @@ _Default:_ `5m` |`number` - The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. + _Default:_ `1` +|`max_docs` or `maxDocs` +|`number` - Maximum number of documents to process (default: all documents) + |`body` |`object` - The search definition using the Query DSL and the prototype for the index request. @@ -3497,7 +3476,7 @@ _Default:_ `512` |`max_concurrent_shard_requests` or `maxConcurrentShardRequests` |`number` - The number of concurrent shard requests per node this 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 + -_Default:_ `The default is 5.` +_Default:_ `5` |`pre_filter_shard_size` or `preFilterShardSize` |`number` - 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. + @@ -3913,9 +3892,6 @@ _Default:_ `true` |`routing` |`string` - Specific routing value. -|`parent` -|`string` - Parent id of documents. - |`realtime` |`boolean` - Specifies if request is real-time as opposed to near-real-time (default: true). @@ -3962,9 +3938,6 @@ link:{ref}/docs-update.html[Reference] |`lang` |`string` - The script language (default: painless) -|`parent` -|`string` - ID of the parent document. Is is only used for routing and when for the upsert request - |`refresh` |`'true', 'false', 'wait_for'` - If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. @@ -4054,7 +4027,10 @@ _Default:_ `open` |`string` - Explicit timeout for each search request. Defaults to no timeout. |`size` -|`number` - Number of hits to return (default: 10) +|`number` - Deprecated, please use `max_docs` instead + +|`max_docs` or `maxDocs` +|`number` - Maximum number of documents to process (default: all documents) |`sort` |`string, string[]` - A comma-separated list of : pairs @@ -4874,6 +4850,10 @@ link:{ref}/ml-find-file-structure.html[Reference] |`number` - How many lines of the file should be included in the analysis + _Default:_ `1000` +|`line_merge_size_limit` or `lineMergeSizeLimit` +|`number` - Maximum number of characters permitted in a single message when lines are merged to create messages. + +_Default:_ `10000` + |`timeout` |`string` - Timeout after which the analysis will be aborted + _Default:_ `25s`