diff --git a/docs/reference/api-reference.md b/docs/reference/api-reference.md index b91c22313..d3a6db5b8 100644 --- a/docs/reference/api-reference.md +++ b/docs/reference/api-reference.md @@ -980,7 +980,6 @@ PUT my-index-000001/_doc/1?version=2&version_type=external "id": "elkbee" } } -``` In this example, the operation will succeed since the supplied version of 2 is higher than the current document version of 1. If the document was already updated and its version was set to 2 or higher, the indexing command will fail and result in a conflict (409 HTTP status code). @@ -9211,7 +9210,7 @@ retrieval. This allows the configuration to be in an acceptable format to be retrieved and then added to another cluster. ## client.ml.getDataFrameAnalyticsStats [_ml.get_data_frame_analytics_stats] -Get data frame analytics jobs usage info. +Get data frame analytics job stats. [Endpoint documentation](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-data-frame-analytics-stats) @@ -9241,7 +9240,7 @@ there are no matches or only partial matches. - **`verbose` (Optional, boolean)**: Defines whether the stats response should be verbose. ## client.ml.getDatafeedStats [_ml.get_datafeed_stats] -Get datafeeds usage info. +Get datafeed stats. You can get statistics for multiple datafeeds in a single API request by using a list of datafeeds or a wildcard expression. You can get statistics for all datafeeds by using `_all`, by specifying `*` as the @@ -9357,7 +9356,7 @@ influencers are sorted by the `influencer_score` value. means it is unset and results are not limited to specific timestamps. ## client.ml.getJobStats [_ml.get_job_stats] -Get anomaly detection jobs usage info. +Get anomaly detection job stats. [Endpoint documentation](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-job-stats) @@ -14245,6 +14244,8 @@ client.synonyms.deleteSynonymRule({ set_id, rule_id }) #### Request (object) [_request_synonyms.delete_synonym_rule] - **`set_id` (string)**: The ID of the synonym set to update. - **`rule_id` (string)**: The ID of the synonym rule to delete. +- **`refresh` (Optional, boolean)**: If `true`, the request will refresh the analyzers with the deleted synonym rule and wait for the new synonyms to be available before returning. +If `false`, analyzers will not be reloaded with the deleted synonym rule ## client.synonyms.getSynonym [_synonyms.get_synonym] Get a synonym set. @@ -14313,6 +14314,8 @@ client.synonyms.putSynonym({ id, synonyms_set }) #### Request (object) [_request_synonyms.put_synonym] - **`id` (string)**: The ID of the synonyms set to be created or updated. - **`synonyms_set` ({ id, synonyms } | { id, synonyms }[])**: The synonym rules definitions for the synonyms set. +- **`refresh` (Optional, boolean)**: If `true`, the request will refresh the analyzers with the new synonyms set and wait for the new synonyms to be available before returning. +If `false`, analyzers will not be reloaded with the new synonym set ## client.synonyms.putSynonymRule [_synonyms.put_synonym_rule] Create or update a synonym rule. @@ -14334,6 +14337,8 @@ client.synonyms.putSynonymRule({ set_id, rule_id, synonyms }) - **`set_id` (string)**: The ID of the synonym set. - **`rule_id` (string)**: The ID of the synonym rule to be updated or created. - **`synonyms` (string)**: The synonym rule information definition, which must be in Solr format. +- **`refresh` (Optional, boolean)**: If `true`, the request will refresh the analyzers with the new synonym rule and wait for the new synonyms to be available before returning. +If `false`, analyzers will not be reloaded with the new synonym rule ## client.tasks.cancel [_tasks.cancel] Cancel a task. diff --git a/src/api/api/ml.ts b/src/api/api/ml.ts index c25f8763e..55cec2dd8 100644 --- a/src/api/api/ml.ts +++ b/src/api/api/ml.ts @@ -2230,7 +2230,7 @@ export default class Ml { } /** - * Get data frame analytics jobs usage info. + * Get data frame analytics job stats. * @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-data-frame-analytics-stats | Elasticsearch API documentation} */ async getDataFrameAnalyticsStats (this: That, params?: T.MlGetDataFrameAnalyticsStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise @@ -2283,7 +2283,7 @@ export default class Ml { } /** - * Get datafeeds usage info. You can get statistics for multiple datafeeds in a single API request by using a comma-separated list of datafeeds or a wildcard expression. You can get statistics for all datafeeds by using `_all`, by specifying `*` as the ``, or by omitting the ``. If the datafeed is stopped, the only information you receive is the `datafeed_id` and the `state`. This API returns a maximum of 10,000 datafeeds. + * Get datafeed stats. You can get statistics for multiple datafeeds in a single API request by using a comma-separated list of datafeeds or a wildcard expression. You can get statistics for all datafeeds by using `_all`, by specifying `*` as the ``, or by omitting the ``. If the datafeed is stopped, the only information you receive is the `datafeed_id` and the `state`. This API returns a maximum of 10,000 datafeeds. * @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-datafeed-stats | Elasticsearch API documentation} */ async getDatafeedStats (this: That, params?: T.MlGetDatafeedStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise @@ -2499,7 +2499,7 @@ export default class Ml { } /** - * Get anomaly detection jobs usage info. + * Get anomaly detection job stats. * @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-job-stats | Elasticsearch API documentation} */ async getJobStats (this: That, params?: T.MlGetJobStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise diff --git a/src/api/api/synonyms.ts b/src/api/api/synonyms.ts index fc39d46c3..79888212b 100644 --- a/src/api/api/synonyms.ts +++ b/src/api/api/synonyms.ts @@ -48,7 +48,9 @@ export default class Synonyms { 'rule_id' ], body: [], - query: [] + query: [ + 'refresh' + ] }, 'synonyms.get_synonym': { path: [ @@ -83,7 +85,9 @@ export default class Synonyms { body: [ 'synonyms_set' ], - query: [] + query: [ + 'refresh' + ] }, 'synonyms.put_synonym_rule': { path: [ @@ -93,7 +97,9 @@ export default class Synonyms { body: [ 'synonyms' ], - query: [] + query: [ + 'refresh' + ] } } } diff --git a/src/api/types.ts b/src/api/types.ts index 202f1b299..a3e5271b1 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -34908,9 +34908,9 @@ export type SynonymsSynonymString = string export interface SynonymsSynonymsUpdateResult { /** The update operation result. */ result: Result - /** Updating synonyms in a synonym set reloads the associated analyzers. + /** Updating synonyms in a synonym set can reload the associated analyzers in case refresh is set to true. * This information is the analyzers reloading result. */ - reload_analyzers_details: IndicesReloadSearchAnalyzersReloadResult + reload_analyzers_details?: IndicesReloadSearchAnalyzersReloadResult } export interface SynonymsDeleteSynonymRequest extends RequestBase { @@ -34929,10 +34929,14 @@ export interface SynonymsDeleteSynonymRuleRequest extends RequestBase { set_id: Id /** The ID of the synonym rule to delete. */ rule_id: Id + /** If `true`, the request will refresh the analyzers with the deleted synonym rule and wait for the new synonyms to be available before returning. + * If `false`, analyzers will not be reloaded with the deleted synonym rule + * @remarks This property is not supported on Elastic Cloud Serverless. */ + refresh?: boolean /** All values in `body` will be added to the request body. */ - body?: string | { [key: string]: any } & { set_id?: never, rule_id?: never } + body?: string | { [key: string]: any } & { set_id?: never, rule_id?: never, refresh?: never } /** All values in `querystring` will be added to the request querystring. */ - querystring?: { [key: string]: any } & { set_id?: never, rule_id?: never } + querystring?: { [key: string]: any } & { set_id?: never, rule_id?: never, refresh?: never } } export type SynonymsDeleteSynonymRuleResponse = SynonymsSynonymsUpdateResult @@ -34998,17 +35002,24 @@ export interface SynonymsGetSynonymsSetsSynonymsSetItem { export interface SynonymsPutSynonymRequest extends RequestBase { /** The ID of the synonyms set to be created or updated. */ id: Id + /** If `true`, the request will refresh the analyzers with the new synonyms set and wait for the new synonyms to be available before returning. + * If `false`, analyzers will not be reloaded with the new synonym set + * @remarks This property is not supported on Elastic Cloud Serverless. */ + refresh?: boolean /** The synonym rules definitions for the synonyms set. */ synonyms_set: SynonymsSynonymRule | SynonymsSynonymRule[] /** All values in `body` will be added to the request body. */ - body?: string | { [key: string]: any } & { id?: never, synonyms_set?: never } + body?: string | { [key: string]: any } & { id?: never, refresh?: never, synonyms_set?: never } /** All values in `querystring` will be added to the request querystring. */ - querystring?: { [key: string]: any } & { id?: never, synonyms_set?: never } + querystring?: { [key: string]: any } & { id?: never, refresh?: never, synonyms_set?: never } } export interface SynonymsPutSynonymResponse { + /** The update operation result. */ result: Result - reload_analyzers_details: IndicesReloadSearchAnalyzersReloadResult + /** Updating a synonyms set can reload the associated analyzers in case refresh is set to true. + * This information is the analyzers reloading result. */ + reload_analyzers_details?: IndicesReloadSearchAnalyzersReloadResult } export interface SynonymsPutSynonymRuleRequest extends RequestBase { @@ -35016,12 +35027,16 @@ export interface SynonymsPutSynonymRuleRequest extends RequestBase { set_id: Id /** The ID of the synonym rule to be updated or created. */ rule_id: Id + /** If `true`, the request will refresh the analyzers with the new synonym rule and wait for the new synonyms to be available before returning. + * If `false`, analyzers will not be reloaded with the new synonym rule + * @remarks This property is not supported on Elastic Cloud Serverless. */ + refresh?: boolean /** The synonym rule information definition, which must be in Solr format. */ synonyms: SynonymsSynonymString /** All values in `body` will be added to the request body. */ - body?: string | { [key: string]: any } & { set_id?: never, rule_id?: never, synonyms?: never } + body?: string | { [key: string]: any } & { set_id?: never, rule_id?: never, refresh?: never, synonyms?: never } /** All values in `querystring` will be added to the request querystring. */ - querystring?: { [key: string]: any } & { set_id?: never, rule_id?: never, synonyms?: never } + querystring?: { [key: string]: any } & { set_id?: never, rule_id?: never, refresh?: never, synonyms?: never } } export type SynonymsPutSynonymRuleResponse = SynonymsSynonymsUpdateResult