diff --git a/api/api/cat.thread_pool.js b/api/api/cat.thread_pool.js index 63140220b..e761b4593 100644 --- a/api/api/cat.thread_pool.js +++ b/api/api/cat.thread_pool.js @@ -13,7 +13,7 @@ function buildCatThreadPool (opts) { const acceptedQuerystring = [ 'format', - 'size', + 'time', 'local', 'master_timeout', 'h', diff --git a/api/api/indices.put_index_template.js b/api/api/indices.put_index_template.js index 1593ddc43..3d088a83e 100644 --- a/api/api/indices.put_index_template.js +++ b/api/api/indices.put_index_template.js @@ -12,8 +12,8 @@ function buildIndicesPutIndexTemplate (opts) { const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts const acceptedQuerystring = [ - 'order', 'create', + 'cause', 'master_timeout', 'pretty', 'human', diff --git a/api/api/indices.simulate_index_template.js b/api/api/indices.simulate_index_template.js index ae3bab82f..791806076 100644 --- a/api/api/indices.simulate_index_template.js +++ b/api/api/indices.simulate_index_template.js @@ -12,6 +12,8 @@ function buildIndicesSimulateIndexTemplate (opts) { const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts const acceptedQuerystring = [ + 'create', + 'cause', 'master_timeout', 'pretty', 'human', diff --git a/api/api/reindex.js b/api/api/reindex.js index 5712b2c56..5df290d95 100644 --- a/api/api/reindex.js +++ b/api/api/reindex.js @@ -20,6 +20,7 @@ function buildReindex (opts) { 'scroll', 'slices', 'max_docs', + 'prefer_v2_templates', 'pretty', 'human', 'error_trace', @@ -32,6 +33,7 @@ function buildReindex (opts) { waitForCompletion: 'wait_for_completion', requestsPerSecond: 'requests_per_second', maxDocs: 'max_docs', + preferV2Templates: 'prefer_v2_templates', errorTrace: 'error_trace', filterPath: 'filter_path' } diff --git a/api/requestParams.d.ts b/api/requestParams.d.ts index 3f8adb1b1..78e3a4ea5 100644 --- a/api/requestParams.d.ts +++ b/api/requestParams.d.ts @@ -243,7 +243,7 @@ export interface CatTemplates extends Generic { export interface CatThreadPool extends Generic { thread_pool_patterns?: string | string[]; format?: string; - size?: '' | 'k' | 'm' | 'g' | 't' | 'p'; + time?: 'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos'; local?: boolean; master_timeout?: string; h?: string | string[]; @@ -825,8 +825,8 @@ export interface IndicesPutAlias extends Generic { export interface IndicesPutIndexTemplate extends Generic { name: string; - order?: number; create?: boolean; + cause?: string; master_timeout?: string; body: T; } @@ -912,6 +912,8 @@ export interface IndicesShrink extends Generic { export interface IndicesSimulateIndexTemplate extends Generic { name: string; + create?: boolean; + cause?: string; master_timeout?: string; body?: T; } @@ -1129,6 +1131,7 @@ export interface Reindex extends Generic { scroll?: string; slices?: number|string; max_docs?: number; + prefer_v2_templates?: boolean; body: T; } diff --git a/docs/reference.asciidoc b/docs/reference.asciidoc index 5d76ef6ec..240777322 100644 --- a/docs/reference.asciidoc +++ b/docs/reference.asciidoc @@ -1002,7 +1002,7 @@ link:{ref}/cat-templates.html[Documentation] + client.cat.threadPool({ thread_pool_patterns: string | string[], format: string, - size: '' | 'k' | 'm' | 'g' | 't' | 'p', + time: 'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos', local: boolean, master_timeout: string, h: string | string[], @@ -1020,8 +1020,8 @@ link:{ref}/cat-thread-pool.html[Documentation] + |`format` |`string` - a short version of the Accept header, e.g. json, yaml -|`size` -|`'' \| 'k' \| 'm' \| 'g' \| 't' \| 'p'` - The multiplier in which to display values +|`time` +|`'d' \| 'h' \| 'm' \| 's' \| 'ms' \| 'micros' \| 'nanos'` - The unit in which to display time values |`local` |`boolean` - Return local information, do not retrieve the state from master node (default: false) @@ -3317,8 +3317,8 @@ link:{ref}/indices-aliases.html[Documentation] + ---- client.indices.putIndexTemplate({ name: string, - order: number, create: boolean, + cause: string, master_timeout: string, body: object }) @@ -3329,12 +3329,12 @@ link:{ref}/indices-templates.html[Documentation] + |`name` |`string` - The name of the template -|`order` -|`number` - The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers) - |`create` |`boolean` - Whether the index template should only be added if new or can also replace an existing one +|`cause` +|`string` - User defined reason for creating/updating the index template + |`master_timeout` or `masterTimeout` |`string` - Specify timeout for connection to master @@ -3670,6 +3670,8 @@ link:{ref}/indices-shrink-index.html[Documentation] + ---- client.indices.simulateIndexTemplate({ name: string, + create: boolean, + cause: string, master_timeout: string, body: object }) @@ -3680,6 +3682,12 @@ link:{ref}/indices-templates.html[Documentation] + |`name` |`string` - The name of the index (it must be a concrete index name) +|`create` +|`boolean` - Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one + +|`cause` +|`string` - User defined reason for dry-run creating the new template for simulation purposes + |`master_timeout` or `masterTimeout` |`string` - Specify timeout for connection to master @@ -4518,6 +4526,7 @@ client.reindex({ scroll: string, slices: number|string, max_docs: number, + prefer_v2_templates: boolean, body: object }) ---- @@ -4553,6 +4562,9 @@ _Default:_ `1` |`max_docs` or `maxDocs` |`number` - Maximum number of documents to process (default: all documents) +|`prefer_v2_templates` or `preferV2Templates` +|`boolean` - favor V2 templates instead of V1 templates during index creation + |`body` |`object` - The search definition using the Query DSL and the prototype for the index request.