Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 13 additions & 30 deletions docs/reference.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2591,27 +2591,6 @@ Cannot be longer than 255 bytes. Multi-byte characters count towards this limit
** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

[discrete]
==== data_streams_stats
Get data stream stats.
Retrieves statistics for one or more data streams.

{ref}/data-streams.html[Endpoint documentation]
[source,ts]
----
client.indices.dataStreamsStats({ ... })
----

[discrete]
==== Arguments

* *Request (object):*
** *`name` (Optional, string)*: List of data streams used to limit the request.
Wildcard expressions (`*`) are supported.
To target all data streams in a cluster, omit this parameter or use `*`.
** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of data stream that wildcard patterns can match.
Supports a list of values, such as `open,hidden`.

[discrete]
==== delete
Delete indices.
Expand Down Expand Up @@ -3203,7 +3182,7 @@ a new date field is added instead of string.
not used at all by Elasticsearch, but can be used to store
application-specific metadata.
** *`numeric_detection` (Optional, boolean)*: Automatically map strings into numeric data types for all fields.
** *`properties` (Optional, Record<string, { type } | { boost, fielddata, index, null_value, type } | { type, enabled, null_value, boost, coerce, script, on_script_error, ignore_malformed, time_series_metric, analyzer, eager_global_ordinals, index, index_options, index_phrases, index_prefixes, norms, position_increment_gap, search_analyzer, search_quote_analyzer, term_vector, format, precision_step, locale } | { relations, eager_global_ordinals, type } | { boost, eager_global_ordinals, index, index_options, script, on_script_error, normalizer, norms, null_value, split_queries_on_whitespace, time_series_dimension, type } | { type, fields, meta, copy_to } | { type } | { positive_score_impact, type } | { positive_score_impact, type } | { analyzer, index, index_options, max_shingle_size, norms, search_analyzer, search_quote_analyzer, term_vector, type } | { analyzer, boost, eager_global_ordinals, fielddata, fielddata_frequency_filter, index, index_options, index_phrases, index_prefixes, norms, position_increment_gap, search_analyzer, search_quote_analyzer, term_vector, type } | { type } | { type, null_value } | { boost, format, ignore_malformed, index, null_value, precision_step, type } | { boost, fielddata, format, ignore_malformed, index, null_value, precision_step, locale, type } | { type, default_metric, metrics, time_series_metric } | { type, element_type, dims, similarity, index, index_options } | { boost, depth_limit, doc_values, eager_global_ordinals, index, index_options, null_value, similarity, split_queries_on_whitespace, type } | { enabled, include_in_parent, include_in_root, type } | { enabled, subobjects, type } | { type, meta, inference_id } | { type } | { analyzer, contexts, max_input_length, preserve_position_increments, preserve_separators, search_analyzer, type } | { value, type } | { path, type } | { ignore_malformed, type } | { boost, index, ignore_malformed, null_value, on_script_error, script, time_series_dimension, type } | { type } | { analyzer, boost, index, null_value, enable_position_increments, type } | { ignore_malformed, ignore_z_value, null_value, index, on_script_error, script, type } | { coerce, ignore_malformed, ignore_z_value, orientation, strategy, type } | { ignore_malformed, ignore_z_value, null_value, type } | { coerce, ignore_malformed, ignore_z_value, orientation, type } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value, scaling_factor } | { type, null_value } | { type, null_value } | { format, type } | { type } | { type } | { type } | { type } | { type } | { type, norms, index_options, index, null_value, rules, language, country, variant, strength, decomposition, alternate, case_level, case_first, numeric, variable_top, hiragana_quaternary_mode }>)*: Mapping for a field. For new fields, this mapping can include:
** *`properties` (Optional, Record<string, { type } | { boost, fielddata, index, null_value, type } | { type, enabled, null_value, boost, coerce, script, on_script_error, ignore_malformed, time_series_metric, analyzer, eager_global_ordinals, index, index_options, index_phrases, index_prefixes, norms, position_increment_gap, search_analyzer, search_quote_analyzer, term_vector, format, precision_step, locale } | { relations, eager_global_ordinals, type } | { boost, eager_global_ordinals, index, index_options, script, on_script_error, normalizer, norms, null_value, similarity, split_queries_on_whitespace, time_series_dimension, type } | { type, fields, meta, copy_to } | { type } | { positive_score_impact, type } | { positive_score_impact, type } | { analyzer, index, index_options, max_shingle_size, norms, search_analyzer, search_quote_analyzer, similarity, term_vector, type } | { analyzer, boost, eager_global_ordinals, fielddata, fielddata_frequency_filter, index, index_options, index_phrases, index_prefixes, norms, position_increment_gap, search_analyzer, search_quote_analyzer, similarity, term_vector, type } | { type } | { type, null_value } | { boost, format, ignore_malformed, index, null_value, precision_step, type } | { boost, fielddata, format, ignore_malformed, index, null_value, precision_step, locale, type } | { type, default_metric, metrics, time_series_metric } | { type, element_type, dims, similarity, index, index_options } | { boost, depth_limit, doc_values, eager_global_ordinals, index, index_options, null_value, similarity, split_queries_on_whitespace, type } | { enabled, include_in_parent, include_in_root, type } | { enabled, subobjects, type } | { type, meta, inference_id } | { type } | { analyzer, contexts, max_input_length, preserve_position_increments, preserve_separators, search_analyzer, type } | { value, type } | { path, type } | { ignore_malformed, type } | { boost, index, ignore_malformed, null_value, on_script_error, script, time_series_dimension, type } | { type } | { analyzer, boost, index, null_value, enable_position_increments, type } | { ignore_malformed, ignore_z_value, null_value, index, on_script_error, script, type } | { coerce, ignore_malformed, ignore_z_value, orientation, strategy, type } | { ignore_malformed, ignore_z_value, null_value, type } | { coerce, ignore_malformed, ignore_z_value, orientation, type } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value, scaling_factor } | { type, null_value } | { type, null_value } | { format, type } | { type } | { type } | { type } | { type } | { type } | { type, norms, index_options, index, null_value, rules, language, country, variant, strength, decomposition, alternate, case_level, case_first, numeric, variable_top, hiragana_quaternary_mode }>)*: Mapping for a field. For new fields, this mapping can include:

- Field name
- Field data type
Expand Down Expand Up @@ -4489,7 +4468,7 @@ client.ml.postCalendarEvents({ calendar_id, events })

* *Request (object):*
** *`calendar_id` (string)*: A string that uniquely identifies a calendar.
** *`events` ({ calendar_id, event_id, description, end_time, start_time }[])*: A list of one of more scheduled events. The event’s start and end times can be specified as integer milliseconds since the epoch or as a string in ISO 8601 format.
** *`events` ({ calendar_id, event_id, description, end_time, start_time, skip_result, skip_model_update, force_time_shift }[])*: A list of one of more scheduled events. The event’s start and end times can be specified as integer milliseconds since the epoch or as a string in ISO 8601 format.

[discrete]
==== preview_data_frame_analytics
Expand Down Expand Up @@ -5443,7 +5422,8 @@ client.queryRules.putRuleset({ ruleset_id, rules })
=== search_application
[discrete]
==== delete
Deletes a search application.
Delete a search application.
Remove a search application and its associated alias. Indices attached to the search application are not removed.

{ref}/delete-search-application.html[Endpoint documentation]
[source,ts]
Expand All @@ -5460,6 +5440,7 @@ client.searchApplication.delete({ name })
[discrete]
==== delete_behavioral_analytics
Delete a behavioral analytics collection.
The associated data stream is also deleted.

{ref}/delete-analytics-collection.html[Endpoint documentation]
[source,ts]
Expand All @@ -5475,7 +5456,7 @@ client.searchApplication.deleteBehavioralAnalytics({ name })

[discrete]
==== get
Returns the details about a search application
Get search application details.

{ref}/get-search-application.html[Endpoint documentation]
[source,ts]
Expand All @@ -5491,7 +5472,7 @@ client.searchApplication.get({ name })

[discrete]
==== get_behavioral_analytics
Returns the existing behavioral analytics collections.
Get behavioral analytics collections.

{ref}/list-analytics-collection.html[Endpoint documentation]
[source,ts]
Expand Down Expand Up @@ -5525,7 +5506,7 @@ client.searchApplication.list({ ... })

[discrete]
==== put
Creates or updates a search application.
Create or update a search application.

{ref}/put-search-application.html[Endpoint documentation]
[source,ts]
Expand All @@ -5543,7 +5524,7 @@ client.searchApplication.put({ name })

[discrete]
==== put_behavioral_analytics
Creates a behavioral analytics collection.
Create a behavioral analytics collection.

{ref}/put-analytics-collection.html[Endpoint documentation]
[source,ts]
Expand All @@ -5559,7 +5540,9 @@ client.searchApplication.putBehavioralAnalytics({ name })

[discrete]
==== search
Perform a search against a search application.
Run a search application search.
Generate and run an Elasticsearch query that uses the specified query parameteter and the search template associated with the search application or default template.
Unspecified template parameters are assigned their default values if applicable.

{ref}/search-application-search.html[Endpoint documentation]
[source,ts]
Expand Down Expand Up @@ -5882,7 +5865,7 @@ precedence over mapped fields with the same name.
** *`keep_alive` (Optional, string | -1 | 0)*: Retention period for an async or saved synchronous search.
** *`keep_on_completion` (Optional, boolean)*: If true, Elasticsearch stores synchronous searches if you also specify the wait_for_completion_timeout parameter. If false, Elasticsearch only stores async searches that don’t finish before the wait_for_completion_timeout.
** *`index_using_frozen` (Optional, boolean)*: If true, the search can run on frozen indices. Defaults to false.
** *`format` (Optional, string)*: Format for the response.
** *`format` (Optional, Enum("csv" | "json" | "tsv" | "txt" | "yaml" | "cbor" | "smile"))*: Format for the response.

[discrete]
==== translate
Expand Down
40 changes: 0 additions & 40 deletions src/api/api/indices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,46 +205,6 @@ export default class Indices {
return await this.transport.request({ path, method, querystring, body, meta }, options)
}

/**
* Get data stream stats. Retrieves statistics for one or more data streams.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html | Elasticsearch API documentation}
*/
async dataStreamsStats (this: That, params?: T.IndicesDataStreamsStatsRequest | TB.IndicesDataStreamsStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesDataStreamsStatsResponse>
async dataStreamsStats (this: That, params?: T.IndicesDataStreamsStatsRequest | TB.IndicesDataStreamsStatsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesDataStreamsStatsResponse, unknown>>
async dataStreamsStats (this: That, params?: T.IndicesDataStreamsStatsRequest | TB.IndicesDataStreamsStatsRequest, options?: TransportRequestOptions): Promise<T.IndicesDataStreamsStatsResponse>
async dataStreamsStats (this: That, params?: T.IndicesDataStreamsStatsRequest | TB.IndicesDataStreamsStatsRequest, options?: TransportRequestOptions): Promise<any> {
const acceptedPath: string[] = ['name']
const querystring: Record<string, any> = {}
const body = undefined

params = params ?? {}
for (const key in params) {
if (acceptedPath.includes(key)) {
continue
} else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key]
}
}

let method = ''
let path = ''
if (params.name != null) {
method = 'GET'
path = `/_data_stream/${encodeURIComponent(params.name.toString())}/_stats`
} else {
method = 'GET'
path = '/_data_stream/_stats'
}
const meta: TransportRequestMetadata = {
name: 'indices.data_streams_stats',
pathParts: {
name: params.name
}
}
return await this.transport.request({ path, method, querystring, body, meta }, options)
}

/**
* Delete indices. Deletes one or more indices.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html | Elasticsearch API documentation}
Expand Down
14 changes: 7 additions & 7 deletions src/api/api/search_application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default class SearchApplication {
}

/**
* Deletes a search application.
* Delete a search application. Remove a search application and its associated alias. Indices attached to the search application are not removed.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-search-application.html | Elasticsearch API documentation}
*/
async delete (this: That, params: T.SearchApplicationDeleteRequest | TB.SearchApplicationDeleteRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SearchApplicationDeleteResponse>
Expand Down Expand Up @@ -77,7 +77,7 @@ export default class SearchApplication {
}

/**
* Delete a behavioral analytics collection.
* Delete a behavioral analytics collection. The associated data stream is also deleted.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-analytics-collection.html | Elasticsearch API documentation}
*/
async deleteBehavioralAnalytics (this: That, params: T.SearchApplicationDeleteBehavioralAnalyticsRequest | TB.SearchApplicationDeleteBehavioralAnalyticsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SearchApplicationDeleteBehavioralAnalyticsResponse>
Expand Down Expand Up @@ -109,7 +109,7 @@ export default class SearchApplication {
}

/**
* Returns the details about a search application
* Get search application details.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/get-search-application.html | Elasticsearch API documentation}
*/
async get (this: That, params: T.SearchApplicationGetRequest | TB.SearchApplicationGetRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SearchApplicationGetResponse>
Expand Down Expand Up @@ -141,7 +141,7 @@ export default class SearchApplication {
}

/**
* Returns the existing behavioral analytics collections.
* Get behavioral analytics collections.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/list-analytics-collection.html | Elasticsearch API documentation}
*/
async getBehavioralAnalytics (this: That, params?: T.SearchApplicationGetBehavioralAnalyticsRequest | TB.SearchApplicationGetBehavioralAnalyticsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SearchApplicationGetBehavioralAnalyticsResponse>
Expand Down Expand Up @@ -211,7 +211,7 @@ export default class SearchApplication {
}

/**
* Creates or updates a search application.
* Create or update a search application.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/put-search-application.html | Elasticsearch API documentation}
*/
async put (this: That, params: T.SearchApplicationPutRequest | TB.SearchApplicationPutRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SearchApplicationPutResponse>
Expand Down Expand Up @@ -248,7 +248,7 @@ export default class SearchApplication {
}

/**
* Creates a behavioral analytics collection.
* Create a behavioral analytics collection.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/put-analytics-collection.html | Elasticsearch API documentation}
*/
async putBehavioralAnalytics (this: That, params: T.SearchApplicationPutBehavioralAnalyticsRequest | TB.SearchApplicationPutBehavioralAnalyticsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SearchApplicationPutBehavioralAnalyticsResponse>
Expand Down Expand Up @@ -280,7 +280,7 @@ export default class SearchApplication {
}

/**
* Perform a search against a search application.
* Run a search application search. Generate and run an Elasticsearch query that uses the specified query parameteter and the search template associated with the search application or default template. Unspecified template parameters are assigned their default values if applicable.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/search-application-search.html | Elasticsearch API documentation}
*/
async search<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params: T.SearchApplicationSearchRequest | TB.SearchApplicationSearchRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SearchApplicationSearchResponse<TDocument, TAggregations>>
Expand Down
Loading