diff --git a/api/api/async_search.submit.js b/api/api/async_search.submit.js index 30d408051..e46a1785f 100644 --- a/api/api/async_search.submit.js +++ b/api/api/async_search.submit.js @@ -38,7 +38,9 @@ function buildAsyncSearchSubmit (opts) { 'sort', '_source', '_source_excludes', + '_source_exclude', '_source_includes', + '_source_include', 'terminate_after', 'stats', 'suggest_field', @@ -71,7 +73,9 @@ function buildAsyncSearchSubmit (opts) { expandWildcards: 'expand_wildcards', searchType: 'search_type', _sourceExcludes: '_source_excludes', + _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', + _sourceInclude: '_source_include', terminateAfter: 'terminate_after', suggestField: 'suggest_field', suggestMode: 'suggest_mode', diff --git a/api/api/bulk.js b/api/api/bulk.js index 361dd22b1..683c50310 100644 --- a/api/api/bulk.js +++ b/api/api/bulk.js @@ -19,7 +19,9 @@ function buildBulk (opts) { 'type', '_source', '_source_excludes', + '_source_exclude', '_source_includes', + '_source_include', 'pipeline', 'pretty', 'human', @@ -31,7 +33,9 @@ function buildBulk (opts) { const snakeCase = { waitForActiveShards: 'wait_for_active_shards', _sourceExcludes: '_source_excludes', + _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', + _sourceInclude: '_source_include', errorTrace: 'error_trace', filterPath: 'filter_path' } diff --git a/api/api/delete_by_query.js b/api/api/delete_by_query.js index 8573f14b6..41f23ce59 100644 --- a/api/api/delete_by_query.js +++ b/api/api/delete_by_query.js @@ -33,7 +33,9 @@ function buildDeleteByQuery (opts) { 'sort', '_source', '_source_excludes', + '_source_exclude', '_source_includes', + '_source_include', 'terminate_after', 'stats', 'version', @@ -62,7 +64,9 @@ function buildDeleteByQuery (opts) { searchTimeout: 'search_timeout', maxDocs: 'max_docs', _sourceExcludes: '_source_excludes', + _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', + _sourceInclude: '_source_include', terminateAfter: 'terminate_after', requestCache: 'request_cache', waitForActiveShards: 'wait_for_active_shards', diff --git a/api/api/exists.js b/api/api/exists.js index 7659a0907..c48a5299b 100644 --- a/api/api/exists.js +++ b/api/api/exists.js @@ -19,7 +19,9 @@ function buildExists (opts) { 'routing', '_source', '_source_excludes', + '_source_exclude', '_source_includes', + '_source_include', 'version', 'version_type', 'pretty', @@ -32,7 +34,9 @@ function buildExists (opts) { const snakeCase = { storedFields: 'stored_fields', _sourceExcludes: '_source_excludes', + _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', + _sourceInclude: '_source_include', versionType: 'version_type', errorTrace: 'error_trace', filterPath: 'filter_path' diff --git a/api/api/exists_source.js b/api/api/exists_source.js index 059ed1de5..fab3f6d85 100644 --- a/api/api/exists_source.js +++ b/api/api/exists_source.js @@ -18,7 +18,9 @@ function buildExistsSource (opts) { 'routing', '_source', '_source_excludes', + '_source_exclude', '_source_includes', + '_source_include', 'version', 'version_type', 'pretty', @@ -30,7 +32,9 @@ function buildExistsSource (opts) { const snakeCase = { _sourceExcludes: '_source_excludes', + _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', + _sourceInclude: '_source_include', versionType: 'version_type', errorTrace: 'error_trace', filterPath: 'filter_path' diff --git a/api/api/explain.js b/api/api/explain.js index cf513bdcb..71aab5acf 100644 --- a/api/api/explain.js +++ b/api/api/explain.js @@ -23,7 +23,9 @@ function buildExplain (opts) { 'routing', '_source', '_source_excludes', + '_source_exclude', '_source_includes', + '_source_include', 'pretty', 'human', 'error_trace', @@ -36,7 +38,9 @@ function buildExplain (opts) { defaultOperator: 'default_operator', storedFields: 'stored_fields', _sourceExcludes: '_source_excludes', + _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', + _sourceInclude: '_source_include', errorTrace: 'error_trace', filterPath: 'filter_path' } diff --git a/api/api/get.js b/api/api/get.js index ee5aeeee7..87b127cab 100644 --- a/api/api/get.js +++ b/api/api/get.js @@ -19,7 +19,9 @@ function buildGet (opts) { 'routing', '_source', '_source_excludes', + '_source_exclude', '_source_includes', + '_source_include', 'version', 'version_type', 'pretty', @@ -32,7 +34,9 @@ function buildGet (opts) { const snakeCase = { storedFields: 'stored_fields', _sourceExcludes: '_source_excludes', + _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', + _sourceInclude: '_source_include', versionType: 'version_type', errorTrace: 'error_trace', filterPath: 'filter_path' diff --git a/api/api/get_source.js b/api/api/get_source.js index 08543b96a..70bd3deff 100644 --- a/api/api/get_source.js +++ b/api/api/get_source.js @@ -18,7 +18,9 @@ function buildGetSource (opts) { 'routing', '_source', '_source_excludes', + '_source_exclude', '_source_includes', + '_source_include', 'version', 'version_type', 'pretty', @@ -30,7 +32,9 @@ function buildGetSource (opts) { const snakeCase = { _sourceExcludes: '_source_excludes', + _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', + _sourceInclude: '_source_include', versionType: 'version_type', errorTrace: 'error_trace', filterPath: 'filter_path' diff --git a/api/api/indices.add_block.js b/api/api/indices.add_block.js index 51fae6185..4182141f9 100644 --- a/api/api/indices.add_block.js +++ b/api/api/indices.add_block.js @@ -36,7 +36,7 @@ function buildIndicesAddBlock (opts) { /** * Perform a indices.add_block request * Adds a block to an index. - * https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-blocks.html + * https://www.elastic.co/guide/en/elasticsearch/reference/master/index-modules-blocks.html */ return function indicesAddBlock (params, options, callback) { options = options || {} diff --git a/api/api/indices.create_data_stream.js b/api/api/indices.create_data_stream.js index cf91b0e4d..60b676712 100644 --- a/api/api/indices.create_data_stream.js +++ b/api/api/indices.create_data_stream.js @@ -21,7 +21,7 @@ function buildIndicesCreateDataStream (opts) { /** * Perform a indices.create_data_stream request - * Creates or updates a data stream + * Creates a data stream * https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html */ return function indicesCreateDataStream (params, options, callback) { diff --git a/api/api/indices.resolve_index.js b/api/api/indices.resolve_index.js index 12cfedab6..f5bb9f8f5 100644 --- a/api/api/indices.resolve_index.js +++ b/api/api/indices.resolve_index.js @@ -29,7 +29,7 @@ function buildIndicesResolveIndex (opts) { /** * Perform a indices.resolve_index request * Returns information about any matching indices, aliases, and data streams - * https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-resolve-index.html + * https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-resolve-index-api.html */ return function indicesResolveIndex (params, options, callback) { options = options || {} diff --git a/api/api/mget.js b/api/api/mget.js index 2e6093e5e..fbf6f03f4 100644 --- a/api/api/mget.js +++ b/api/api/mget.js @@ -19,7 +19,9 @@ function buildMget (opts) { 'routing', '_source', '_source_excludes', + '_source_exclude', '_source_includes', + '_source_include', 'pretty', 'human', 'error_trace', @@ -30,7 +32,9 @@ function buildMget (opts) { const snakeCase = { storedFields: 'stored_fields', _sourceExcludes: '_source_excludes', + _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', + _sourceInclude: '_source_include', errorTrace: 'error_trace', filterPath: 'filter_path' } diff --git a/api/api/search.js b/api/api/search.js index c17ccd295..8e058048f 100644 --- a/api/api/search.js +++ b/api/api/search.js @@ -35,7 +35,9 @@ function buildSearch (opts) { 'sort', '_source', '_source_excludes', + '_source_exclude', '_source_includes', + '_source_include', 'terminate_after', 'stats', 'suggest_field', @@ -73,7 +75,9 @@ function buildSearch (opts) { expandWildcards: 'expand_wildcards', searchType: 'search_type', _sourceExcludes: '_source_excludes', + _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', + _sourceInclude: '_source_include', terminateAfter: 'terminate_after', suggestField: 'suggest_field', suggestMode: 'suggest_mode', diff --git a/api/api/update.js b/api/api/update.js index e45c32c38..bd5744bba 100644 --- a/api/api/update.js +++ b/api/api/update.js @@ -15,7 +15,9 @@ function buildUpdate (opts) { 'wait_for_active_shards', '_source', '_source_excludes', + '_source_exclude', '_source_includes', + '_source_include', 'lang', 'refresh', 'retry_on_conflict', @@ -33,7 +35,9 @@ function buildUpdate (opts) { const snakeCase = { waitForActiveShards: 'wait_for_active_shards', _sourceExcludes: '_source_excludes', + _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', + _sourceInclude: '_source_include', retryOnConflict: 'retry_on_conflict', ifSeqNo: 'if_seq_no', ifPrimaryTerm: 'if_primary_term', diff --git a/api/api/update_by_query.js b/api/api/update_by_query.js index 2ba13c742..682e44ddd 100644 --- a/api/api/update_by_query.js +++ b/api/api/update_by_query.js @@ -34,7 +34,9 @@ function buildUpdateByQuery (opts) { 'sort', '_source', '_source_excludes', + '_source_exclude', '_source_includes', + '_source_include', 'terminate_after', 'stats', 'version', @@ -64,7 +66,9 @@ function buildUpdateByQuery (opts) { searchTimeout: 'search_timeout', maxDocs: 'max_docs', _sourceExcludes: '_source_excludes', + _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', + _sourceInclude: '_source_include', terminateAfter: 'terminate_after', versionType: 'version_type', requestCache: 'request_cache', diff --git a/api/kibana.d.ts b/api/kibana.d.ts index 5c556f475..f42929e19 100644 --- a/api/kibana.d.ts +++ b/api/kibana.d.ts @@ -187,7 +187,7 @@ interface KibanaClient { clone, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.IndicesClone, options?: TransportRequestOptions): TransportRequestPromise> close, TContext = Context>(params?: RequestParams.IndicesClose, options?: TransportRequestOptions): TransportRequestPromise> create, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.IndicesCreate, options?: TransportRequestOptions): TransportRequestPromise> - createDataStream, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.IndicesCreateDataStream, options?: TransportRequestOptions): TransportRequestPromise> + createDataStream, TContext = Context>(params?: RequestParams.IndicesCreateDataStream, options?: TransportRequestOptions): TransportRequestPromise> dataStreamsStats, TContext = Context>(params?: RequestParams.IndicesDataStreamsStats, options?: TransportRequestOptions): TransportRequestPromise> delete, TContext = Context>(params?: RequestParams.IndicesDelete, options?: TransportRequestOptions): TransportRequestPromise> deleteAlias, TContext = Context>(params?: RequestParams.IndicesDeleteAlias, options?: TransportRequestOptions): TransportRequestPromise> diff --git a/api/requestParams.d.ts b/api/requestParams.d.ts index 40f1ece0c..8a1b4cb11 100644 --- a/api/requestParams.d.ts +++ b/api/requestParams.d.ts @@ -16,6 +16,8 @@ export interface Generic { export interface Bulk extends Generic { index?: string; type?: string; + _source_exclude?: string | string[]; + _source_include?: string | string[]; wait_for_active_shards?: string; refresh?: 'wait_for' | boolean; routing?: string; @@ -430,6 +432,8 @@ export interface Delete extends Generic { export interface DeleteByQuery extends Generic { index: string | string[]; type?: string | string[]; + _source_exclude?: string | string[]; + _source_include?: string | string[]; analyzer?: string; analyze_wildcard?: boolean; default_operator?: 'AND' | 'OR'; @@ -481,6 +485,8 @@ export interface Exists extends Generic { id: string; index: string; type?: string; + _source_exclude?: string | string[]; + _source_include?: string | string[]; stored_fields?: string | string[]; preference?: string; realtime?: boolean; @@ -497,6 +503,8 @@ export interface ExistsSource extends Generic { id: string; index: string; type?: string; + _source_exclude?: string | string[]; + _source_include?: string | string[]; preference?: string; realtime?: boolean; refresh?: boolean; @@ -512,6 +520,8 @@ export interface Explain extends Generic { id: string; index: string; type?: string; + _source_exclude?: string | string[]; + _source_include?: string | string[]; analyze_wildcard?: boolean; analyzer?: string; default_operator?: 'AND' | 'OR'; @@ -541,6 +551,8 @@ export interface Get extends Generic { id: string; index: string; type?: string; + _source_exclude?: string | string[]; + _source_include?: string | string[]; stored_fields?: string | string[]; preference?: string; realtime?: boolean; @@ -568,6 +580,8 @@ export interface GetSource extends Generic { id: string; index: string; type?: string; + _source_exclude?: string | string[]; + _source_include?: string | string[]; preference?: string; realtime?: boolean; refresh?: boolean; @@ -1046,6 +1060,8 @@ export interface IngestSimulate extends Generic { export interface Mget extends Generic { index?: string; type?: string; + _source_exclude?: string | string[]; + _source_include?: string | string[]; stored_fields?: string | string[]; preference?: string; realtime?: boolean; @@ -1198,6 +1214,8 @@ export interface Scroll extends Generic { export interface Search extends Generic { index?: string | string[]; type?: string | string[]; + _source_exclude?: string | string[]; + _source_include?: string | string[]; analyzer?: string; analyze_wildcard?: boolean; ccs_minimize_roundtrips?: boolean; @@ -1387,6 +1405,8 @@ export interface Update extends Generic { id: string; index: string; type?: string; + _source_exclude?: string | string[]; + _source_include?: string | string[]; wait_for_active_shards?: string; _source?: string | string[]; _source_excludes?: string | string[]; @@ -1404,6 +1424,8 @@ export interface Update extends Generic { export interface UpdateByQuery extends Generic { index: string | string[]; type?: string | string[]; + _source_exclude?: string | string[]; + _source_include?: string | string[]; analyzer?: string; analyze_wildcard?: boolean; default_operator?: 'AND' | 'OR'; @@ -1460,6 +1482,8 @@ export interface AsyncSearchGet extends Generic { export interface AsyncSearchSubmit extends Generic { index?: string | string[]; + _source_exclude?: string | string[]; + _source_include?: string | string[]; wait_for_completion_timeout?: string; keep_on_completion?: boolean; keep_alive?: string; @@ -1726,9 +1750,8 @@ export interface IlmStart extends Generic { export interface IlmStop extends Generic { } -export interface IndicesCreateDataStream extends Generic { +export interface IndicesCreateDataStream extends Generic { name: string; - body?: T; } export interface IndicesDataStreamsStats extends Generic { diff --git a/docs/reference.asciidoc b/docs/reference.asciidoc index 99a6bb342..2664f1468 100644 --- a/docs/reference.asciidoc +++ b/docs/reference.asciidoc @@ -2473,7 +2473,7 @@ client.indices.addBlock({ expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all' }) ---- -link:{ref}/indices-blocks.html[Documentation] + +link:{ref}/index-modules-blocks.html[Documentation] + [cols=2*] |=== |`index` @@ -3700,7 +3700,7 @@ client.indices.resolveIndex({ expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all' }) ---- -link:{ref}/indices-resolve-index.html[Documentation] + +link:{ref}/indices-resolve-index-api.html[Documentation] + [cols=2*] |=== |`name` @@ -7059,8 +7059,7 @@ link:{ref}/ilm-stop.html[Documentation] + [source,ts] ---- client.indices.createDataStream({ - name: string, - body: object + name: string }) ---- link:{ref}/data-streams.html[Documentation] + @@ -7069,9 +7068,6 @@ link:{ref}/data-streams.html[Documentation] + |`name` |`string` - The name of the data stream -|`body` -|`object` - The data stream definition - |=== === indices.dataStreamsStats diff --git a/index.d.ts b/index.d.ts index 80f00ab2d..9cc0780d0 100644 --- a/index.d.ts +++ b/index.d.ts @@ -836,14 +836,14 @@ declare class Client { create, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback create, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.IndicesCreate, callback: callbackFn): TransportRequestCallback create, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.IndicesCreate, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - create_data_stream, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.IndicesCreateDataStream, options?: TransportRequestOptions): TransportRequestPromise> - create_data_stream, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback - create_data_stream, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.IndicesCreateDataStream, callback: callbackFn): TransportRequestCallback - create_data_stream, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.IndicesCreateDataStream, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - createDataStream, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.IndicesCreateDataStream, options?: TransportRequestOptions): TransportRequestPromise> - createDataStream, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback - createDataStream, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.IndicesCreateDataStream, callback: callbackFn): TransportRequestCallback - createDataStream, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.IndicesCreateDataStream, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + create_data_stream, TContext = Context>(params?: RequestParams.IndicesCreateDataStream, options?: TransportRequestOptions): TransportRequestPromise> + create_data_stream, TContext = Context>(callback: callbackFn): TransportRequestCallback + create_data_stream, TContext = Context>(params: RequestParams.IndicesCreateDataStream, callback: callbackFn): TransportRequestCallback + create_data_stream, TContext = Context>(params: RequestParams.IndicesCreateDataStream, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + createDataStream, TContext = Context>(params?: RequestParams.IndicesCreateDataStream, options?: TransportRequestOptions): TransportRequestPromise> + createDataStream, TContext = Context>(callback: callbackFn): TransportRequestCallback + createDataStream, TContext = Context>(params: RequestParams.IndicesCreateDataStream, callback: callbackFn): TransportRequestCallback + createDataStream, TContext = Context>(params: RequestParams.IndicesCreateDataStream, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback data_streams_stats, TContext = Context>(params?: RequestParams.IndicesDataStreamsStats, options?: TransportRequestOptions): TransportRequestPromise> data_streams_stats, TContext = Context>(callback: callbackFn): TransportRequestCallback data_streams_stats, TContext = Context>(params: RequestParams.IndicesDataStreamsStats, callback: callbackFn): TransportRequestCallback