API generation (#875)

This commit is contained in:
Tomas Della Vedova
2019-06-11 21:02:36 +02:00
committed by GitHub
parent ff9904da03
commit f037e8115e
19 changed files with 38 additions and 83 deletions

View File

@ -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'

View File

@ -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',

View File

@ -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',

View File

@ -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 <field>:<direction> 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',

View File

@ -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',

View File

@ -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',

View File

@ -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',

View File

@ -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',

View File

@ -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',

View File

@ -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',

View File

@ -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',

View File

@ -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

View File

@ -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',

View File

@ -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'
}

View File

@ -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',

View File

@ -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',

View File

@ -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 <field>:<direction> 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',

View File

@ -362,7 +362,6 @@ export interface Create<T = any> 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<T = any> 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<T = any> 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<T = any> 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<T = any> 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<T = any> extends Generic {
requests_per_second?: number;
scroll?: string;
slices?: number;
max_docs?: number;
body: T;
}
@ -1270,7 +1263,6 @@ export interface Termvectors<T = any> 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<T = any> 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<T = any> 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<T = any> extends Generic {
lines_to_sample?: number;
line_merge_size_limit?: number;
timeout?: string;
charset?: string;
format?: 'ndjson' | 'xml' | 'delimited' | 'semi_structured_text';

View File

@ -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 <field>:<direction> 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 <field>:<direction> 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`