From 09f1f92225d0572d2242b26ae295f0536247b4ec Mon Sep 17 00:00:00 2001 From: Abdon Pijpelink Date: Tue, 5 Sep 2023 13:14:03 +0200 Subject: [PATCH 1/7] [DOCS] Descriptions for the termvector/mtermvector APIs (#2268) --- output/schema/schema.json | 111 +++++++++++++----- .../mtermvectors/MultiTermVectorsRequest.ts | 51 ++++++++ specification/_global/mtermvectors/types.ts | 45 +++++++ .../_global/termvectors/TermVectorsRequest.ts | 57 +++++++++ specification/_global/termvectors/types.ts | 29 +++++ 5 files changed, 263 insertions(+), 30 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index c037296fb6..4d5c499a4a 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -27160,6 +27160,7 @@ }, "properties": [ { + "description": "The ID of the document.", "name": "_id", "required": true, "type": { @@ -27171,6 +27172,7 @@ } }, { + "description": "The index of the document.", "name": "_index", "required": false, "type": { @@ -27182,6 +27184,7 @@ } }, { + "description": "An artificial document (a document not present in the index) for which you want to retrieve term vectors.", "name": "doc", "required": false, "type": { @@ -27189,6 +27192,7 @@ } }, { + "description": "Comma-separated list or wildcard expressions of fields to include in the statistics.\nUsed as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.", "name": "fields", "required": false, "type": { @@ -27200,8 +27204,10 @@ } }, { + "description": "If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies.", "name": "field_statistics", "required": false, + "serverDefault": true, "type": { "kind": "instance_of", "type": { @@ -27211,6 +27217,7 @@ } }, { + "description": "Filter terms based on their tf-idf scores.", "name": "filter", "required": false, "type": { @@ -27222,8 +27229,10 @@ } }, { + "description": "If `true`, the response includes term offsets.", "name": "offsets", "required": false, + "serverDefault": true, "type": { "kind": "instance_of", "type": { @@ -27233,8 +27242,10 @@ } }, { + "description": "If `true`, the response includes term payloads.", "name": "payloads", "required": false, + "serverDefault": true, "type": { "kind": "instance_of", "type": { @@ -27244,8 +27255,10 @@ } }, { + "description": "If `true`, the response includes term positions.", "name": "positions", "required": false, + "serverDefault": true, "type": { "kind": "instance_of", "type": { @@ -27255,6 +27268,7 @@ } }, { + "description": "Custom value used to route operations to a specific shard.", "name": "routing", "required": false, "type": { @@ -27266,8 +27280,10 @@ } }, { + "description": "If true, the response includes term frequency and document frequency.", "name": "term_statistics", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -27277,6 +27293,7 @@ } }, { + "description": "If `true`, returns the document version as part of a hit.", "name": "version", "required": false, "type": { @@ -27288,6 +27305,7 @@ } }, { + "description": "Specific version type.", "name": "version_type", "required": false, "type": { @@ -27299,7 +27317,7 @@ } } ], - "specLocation": "_global/mtermvectors/types.ts#L35-L49" + "specLocation": "_global/mtermvectors/types.ts#L35-L94" }, { "attachedBehaviors": [ @@ -27309,6 +27327,7 @@ "kind": "properties", "properties": [ { + "description": "Array of existing or artificial documents.", "name": "docs", "required": false, "type": { @@ -27323,6 +27342,7 @@ } }, { + "description": "Simplified syntax to specify documents by their ID if they're in the same index.", "name": "ids", "required": false, "type": { @@ -27352,7 +27372,7 @@ }, "path": [ { - "description": "The index in which the document resides.", + "description": "Name of the index that contains the documents.", "name": "index", "required": false, "type": { @@ -27381,7 +27401,7 @@ } }, { - "description": "A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", + "description": "Comma-separated list or wildcard expressions of fields to include in the statistics.\nUsed as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.", "name": "fields", "required": false, "type": { @@ -27393,9 +27413,10 @@ } }, { - "description": "Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", + "description": "If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies.", "name": "field_statistics", "required": false, + "serverDefault": true, "type": { "kind": "instance_of", "type": { @@ -27405,9 +27426,10 @@ } }, { - "description": "Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", + "description": "If `true`, the response includes term offsets.", "name": "offsets", "required": false, + "serverDefault": true, "type": { "kind": "instance_of", "type": { @@ -27417,9 +27439,10 @@ } }, { - "description": "Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", + "description": "If `true`, the response includes term payloads.", "name": "payloads", "required": false, + "serverDefault": true, "type": { "kind": "instance_of", "type": { @@ -27429,9 +27452,10 @@ } }, { - "description": "Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", + "description": "If `true`, the response includes term positions.", "name": "positions", "required": false, + "serverDefault": true, "type": { "kind": "instance_of", "type": { @@ -27441,7 +27465,7 @@ } }, { - "description": "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\".", + "description": "Specifies the node or shard the operation should be performed on.\nRandom by default.", "name": "preference", "required": false, "type": { @@ -27453,9 +27477,12 @@ } }, { - "description": "Specifies if requests are real-time as opposed to near-real-time (default: true).", + "description": "If true, the request is real-time as opposed to near-real-time.", + "docId": "realtime", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/docs-get.html#realtime", "name": "realtime", "required": false, + "serverDefault": true, "type": { "kind": "instance_of", "type": { @@ -27465,7 +27492,7 @@ } }, { - "description": "Specific routing value. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", + "description": "Custom value used to route operations to a specific shard.", "name": "routing", "required": false, "type": { @@ -27477,9 +27504,10 @@ } }, { - "description": "Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", + "description": "If true, the response includes term frequency and document frequency.", "name": "term_statistics", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -27489,7 +27517,7 @@ } }, { - "description": "Explicit version number for concurrency control", + "description": "If `true`, returns the document version as part of a hit.", "name": "version", "required": false, "type": { @@ -27501,7 +27529,7 @@ } }, { - "description": "Specific version type", + "description": "Specific version type.", "name": "version_type", "required": false, "type": { @@ -27513,7 +27541,7 @@ } } ], - "specLocation": "_global/mtermvectors/MultiTermVectorsRequest.ts#L31-L58" + "specLocation": "_global/mtermvectors/MultiTermVectorsRequest.ts#L31-L109" }, { "body": { @@ -27638,7 +27666,7 @@ } } ], - "specLocation": "_global/mtermvectors/types.ts#L51-L59" + "specLocation": "_global/mtermvectors/types.ts#L96-L104" }, { "attachedBehaviors": [ @@ -37633,6 +37661,7 @@ }, "properties": [ { + "description": "Ignore words which occur in more than this many docs.\nDefaults to unbounded.", "name": "max_doc_freq", "required": false, "type": { @@ -37644,8 +37673,10 @@ } }, { + "description": "Maximum number of terms that must be returned per field.", "name": "max_num_terms", "required": false, + "serverDefault": 25, "type": { "kind": "instance_of", "type": { @@ -37655,6 +37686,7 @@ } }, { + "description": "Ignore words with more than this frequency in the source doc.\nDefaults to unbounded.", "name": "max_term_freq", "required": false, "type": { @@ -37666,8 +37698,10 @@ } }, { + "description": "The maximum word length above which words will be ignored.\nDefaults to unbounded.", "name": "max_word_length", "required": false, + "serverDefault": 0, "type": { "kind": "instance_of", "type": { @@ -37677,8 +37711,10 @@ } }, { + "description": "Ignore terms which do not occur in at least this many docs.", "name": "min_doc_freq", "required": false, + "serverDefault": 1, "type": { "kind": "instance_of", "type": { @@ -37688,8 +37724,10 @@ } }, { + "description": "Ignore words with less than this frequency in the source doc.", "name": "min_term_freq", "required": false, + "serverDefault": 1, "type": { "kind": "instance_of", "type": { @@ -37699,8 +37737,10 @@ } }, { + "description": "The minimum word length below which words will be ignored.", "name": "min_word_length", "required": false, + "serverDefault": 0, "type": { "kind": "instance_of", "type": { @@ -37710,7 +37750,7 @@ } } ], - "specLocation": "_global/termvectors/types.ts#L49-L57" + "specLocation": "_global/termvectors/types.ts#L49-L86" }, { "attachedBehaviors": [ @@ -37720,6 +37760,7 @@ "kind": "properties", "properties": [ { + "description": "An artificial document (a document not present in the index) for which you want to retrieve term vectors.", "name": "doc", "required": false, "type": { @@ -37731,6 +37772,7 @@ } }, { + "description": "Filter terms based on their tf-idf scores.", "name": "filter", "required": false, "type": { @@ -37742,6 +37784,7 @@ } }, { + "description": "Overrides the default per-field analyzer.", "name": "per_field_analyzer", "required": false, "type": { @@ -37785,7 +37828,7 @@ }, "path": [ { - "description": "The index in which the document resides.", + "description": "Name of the index that contains the document.", "name": "index", "required": true, "type": { @@ -37797,7 +37840,7 @@ } }, { - "description": "The id of the document, when not specified a doc param should be supplied.", + "description": "Unique identifier of the document.", "name": "id", "required": false, "type": { @@ -37811,7 +37854,7 @@ ], "query": [ { - "description": "A comma-separated list of fields to return.", + "description": "Comma-separated list or wildcard expressions of fields to include in the statistics.\nUsed as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.", "name": "fields", "required": false, "type": { @@ -37823,9 +37866,10 @@ } }, { - "description": "Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.", + "description": "If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies.", "name": "field_statistics", "required": false, + "serverDefault": true, "type": { "kind": "instance_of", "type": { @@ -37835,9 +37879,10 @@ } }, { - "description": "Specifies if term offsets should be returned.", + "description": "If `true`, the response includes term offsets.", "name": "offsets", "required": false, + "serverDefault": true, "type": { "kind": "instance_of", "type": { @@ -37847,9 +37892,10 @@ } }, { - "description": "Specifies if term payloads should be returned.", + "description": "If `true`, the response includes term payloads.", "name": "payloads", "required": false, + "serverDefault": true, "type": { "kind": "instance_of", "type": { @@ -37859,9 +37905,10 @@ } }, { - "description": "Specifies if term positions should be returned.", + "description": "If `true`, the response includes term positions.", "name": "positions", "required": false, + "serverDefault": true, "type": { "kind": "instance_of", "type": { @@ -37871,7 +37918,7 @@ } }, { - "description": "Specify the node or shard the operation should be performed on (default: random).", + "description": "Specifies the node or shard the operation should be performed on.\nRandom by default.", "name": "preference", "required": false, "type": { @@ -37883,9 +37930,12 @@ } }, { - "description": "Specifies if request is real-time as opposed to near-real-time (default: true).", + "description": "If true, the request is real-time as opposed to near-real-time.", + "docId": "realtime", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/docs-get.html#realtime", "name": "realtime", "required": false, + "serverDefault": true, "type": { "kind": "instance_of", "type": { @@ -37895,7 +37945,7 @@ } }, { - "description": "Specific routing value.", + "description": "Custom value used to route operations to a specific shard.", "name": "routing", "required": false, "type": { @@ -37907,9 +37957,10 @@ } }, { - "description": "Specifies if total term frequency and document frequency should be returned.", + "description": "If `true`, the response includes term frequency and document frequency.", "name": "term_statistics", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -37919,7 +37970,7 @@ } }, { - "description": "Explicit version number for concurrency control", + "description": "If `true`, returns the document version as part of a hit.", "name": "version", "required": false, "type": { @@ -37931,7 +37982,7 @@ } }, { - "description": "Specific version type", + "description": "Specific version type.", "name": "version_type", "required": false, "type": { @@ -37943,7 +37994,7 @@ } } ], - "specLocation": "_global/termvectors/TermVectorsRequest.ts#L33-L61" + "specLocation": "_global/termvectors/TermVectorsRequest.ts#L33-L118" }, { "body": { diff --git a/specification/_global/mtermvectors/MultiTermVectorsRequest.ts b/specification/_global/mtermvectors/MultiTermVectorsRequest.ts index 4901b4407f..a1c15f7aa9 100644 --- a/specification/_global/mtermvectors/MultiTermVectorsRequest.ts +++ b/specification/_global/mtermvectors/MultiTermVectorsRequest.ts @@ -35,24 +35,75 @@ import { Operation } from './types' */ export interface Request extends RequestBase { path_parts: { + /** + * Name of the index that contains the documents. + */ index?: IndexName } query_parameters: { ids?: Id[] + /** + * Comma-separated list or wildcard expressions of fields to include in the statistics. + * Used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters. + */ fields?: Fields + /** + * If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies. + * @server_default true + */ field_statistics?: boolean + /** + * If `true`, the response includes term offsets. + * @server_default true + */ offsets?: boolean + /** + * If `true`, the response includes term payloads. + * @server_default true + */ payloads?: boolean + /** + * If `true`, the response includes term positions. + * @server_default true + */ positions?: boolean + /** + * Specifies the node or shard the operation should be performed on. + * Random by default. + */ preference?: string + /** + * If true, the request is real-time as opposed to near-real-time. + * @server_default true + * @doc_id realtime + */ realtime?: boolean + /** + * Custom value used to route operations to a specific shard. + */ routing?: Routing + /** + * If true, the response includes term frequency and document frequency. + * @server_default false + */ term_statistics?: boolean + /** + * If `true`, returns the document version as part of a hit. + */ version?: VersionNumber + /** + * Specific version type. + */ version_type?: VersionType } body: { + /** + * Array of existing or artificial documents. + */ docs?: Operation[] + /** + * Simplified syntax to specify documents by their ID if they're in the same index. + */ ids?: Id[] } } diff --git a/specification/_global/mtermvectors/types.ts b/specification/_global/mtermvectors/types.ts index c21bdab9ea..ae0353d53d 100644 --- a/specification/_global/mtermvectors/types.ts +++ b/specification/_global/mtermvectors/types.ts @@ -33,18 +33,63 @@ import { ErrorCause } from '@_types/Errors' import { long } from '@_types/Numeric' export class Operation { + /** + * The ID of the document. + */ _id: Id + /** + * The index of the document. + */ _index?: IndexName + /** + * An artificial document (a document not present in the index) for which you want to retrieve term vectors. + */ doc?: UserDefinedValue + /** + * Comma-separated list or wildcard expressions of fields to include in the statistics. + * Used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters. + */ fields?: Fields + /** + * If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies. + * @server_default true + */ field_statistics?: boolean + /** + * Filter terms based on their tf-idf scores. + */ filter?: Filter + /** + * If `true`, the response includes term offsets. + * @server_default true + */ offsets?: boolean + /** + * If `true`, the response includes term payloads. + * @server_default true + */ payloads?: boolean + /** + * If `true`, the response includes term positions. + * @server_default true + */ positions?: boolean + /** + * Custom value used to route operations to a specific shard. + */ routing?: Routing + /** + * If true, the response includes term frequency and document frequency. + * @server_default false + */ term_statistics?: boolean + /** + * If `true`, returns the document version as part of a hit. + */ version?: VersionNumber + /** + * Specific version type. + */ version_type?: VersionType } diff --git a/specification/_global/termvectors/TermVectorsRequest.ts b/specification/_global/termvectors/TermVectorsRequest.ts index 49387a1e8e..9c61a50778 100644 --- a/specification/_global/termvectors/TermVectorsRequest.ts +++ b/specification/_global/termvectors/TermVectorsRequest.ts @@ -37,25 +37,82 @@ import { Filter } from './types' */ export interface Request extends RequestBase { path_parts: { + /** + * Name of the index that contains the document. + */ index: IndexName + /** + * Unique identifier of the document. + */ id?: Id } query_parameters: { + /** + * Comma-separated list or wildcard expressions of fields to include in the statistics. + * Used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters. + */ fields?: Fields + /** + * If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies. + * @server_default true + */ field_statistics?: boolean + /** + * If `true`, the response includes term offsets. + * @server_default true + */ offsets?: boolean + /** + * If `true`, the response includes term payloads. + * @server_default true + */ payloads?: boolean + /** + * If `true`, the response includes term positions. + * @server_default true + */ positions?: boolean + /** + * Specifies the node or shard the operation should be performed on. + * Random by default. + */ preference?: string + /** + * If true, the request is real-time as opposed to near-real-time. + * @server_default true + * @doc_id realtime + */ realtime?: boolean + /** + * Custom value used to route operations to a specific shard. + */ routing?: Routing + /** + * If `true`, the response includes term frequency and document frequency. + * @server_default false + */ term_statistics?: boolean + /** + * If `true`, returns the document version as part of a hit. + */ version?: VersionNumber + /** + * Specific version type. + */ version_type?: VersionType } body: { + /** + * An artificial document (a document not present in the index) for which you want to retrieve term vectors. + */ doc?: TDocument + /** + * Filter terms based on their tf-idf scores. + */ filter?: Filter + /** + * Overrides the default per-field analyzer. + */ per_field_analyzer?: Dictionary } } diff --git a/specification/_global/termvectors/types.ts b/specification/_global/termvectors/types.ts index 501bada5c7..f178c25b74 100644 --- a/specification/_global/termvectors/types.ts +++ b/specification/_global/termvectors/types.ts @@ -47,11 +47,40 @@ export class Token { } export class Filter { + /** + * Ignore words which occur in more than this many docs. + * Defaults to unbounded. + */ max_doc_freq?: integer + /** + * Maximum number of terms that must be returned per field. + * @server_default 25 + */ max_num_terms?: integer + /** + * Ignore words with more than this frequency in the source doc. + * Defaults to unbounded. + */ max_term_freq?: integer + /** + * The maximum word length above which words will be ignored. + * Defaults to unbounded. + * @server_default 0 + */ max_word_length?: integer + /** + * Ignore terms which do not occur in at least this many docs. + * @server_default 1 + */ min_doc_freq?: integer + /** + * Ignore words with less than this frequency in the source doc. + * @server_default 1 + */ min_term_freq?: integer + /** + * The minimum word length below which words will be ignored. + * @server_default 0 + */ min_word_length?: integer } From 9dc7b7082828e6ffa3efd0ef92385d1f8655f9ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Tue, 5 Sep 2023 14:38:07 +0200 Subject: [PATCH 2/7] [DOCS] Adds description to global APIs (#2269) Co-authored-by: Abdon Pijpelink --- output/schema/schema.json | 82 +++++++++++++------ specification/_global/bulk/BulkRequest.ts | 45 +++++++++- specification/_global/bulk/types.ts | 76 +++++++++++++++++ .../clear_scroll/ClearScrollRequest.ts | 9 ++ .../ClosePointInTimeRequest.ts | 4 + 5 files changed, 187 insertions(+), 29 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index 4d5c499a4a..296965a353 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -18992,7 +18992,7 @@ "namespace": "_global.bulk" }, "properties": [], - "specLocation": "_global/bulk/types.ts#L74-L74" + "specLocation": "_global/bulk/types.ts#L130-L130" }, { "inherits": { @@ -19007,7 +19007,7 @@ "namespace": "_global.bulk" }, "properties": [], - "specLocation": "_global/bulk/types.ts#L78-L78" + "specLocation": "_global/bulk/types.ts#L134-L134" }, { "inherits": { @@ -19022,7 +19022,7 @@ "namespace": "_global.bulk" }, "properties": [], - "specLocation": "_global/bulk/types.ts#L76-L76" + "specLocation": "_global/bulk/types.ts#L132-L132" }, { "kind": "interface", @@ -19032,6 +19032,7 @@ }, "properties": [ { + "description": "The document ID.", "name": "_id", "required": false, "type": { @@ -19043,6 +19044,7 @@ } }, { + "description": "Name of the index or index alias to perform the action on.", "name": "_index", "required": false, "type": { @@ -19054,6 +19056,7 @@ } }, { + "description": "Custom value used to route operations to a specific shard.", "name": "routing", "required": false, "type": { @@ -19109,7 +19112,7 @@ } } ], - "specLocation": "_global/bulk/types.ts#L58-L66" + "specLocation": "_global/bulk/types.ts#L90-L107" }, { "kind": "interface", @@ -19119,6 +19122,7 @@ }, "properties": [ { + "description": "Indexes the specified document.\nIf the document exists, replaces the document and increments the version.\nThe following line must contain the source data to be indexed.", "name": "index", "required": false, "type": { @@ -19130,6 +19134,7 @@ } }, { + "description": "Indexes the specified document if it does not already exist.\nThe following line must contain the source data to be indexed.", "name": "create", "required": false, "type": { @@ -19141,6 +19146,7 @@ } }, { + "description": "Performs a partial document update.\nThe following line must contain the partial document and update options.", "name": "update", "required": false, "type": { @@ -19152,6 +19158,7 @@ } }, { + "description": "Removes the specified document from the index.", "name": "delete", "required": false, "type": { @@ -19163,7 +19170,7 @@ } } ], - "specLocation": "_global/bulk/types.ts#L85-L91", + "specLocation": "_global/bulk/types.ts#L145-L167", "variants": { "kind": "container" } @@ -19188,7 +19195,7 @@ "name": "OperationType", "namespace": "_global.bulk" }, - "specLocation": "_global/bulk/types.ts#L51-L56" + "specLocation": "_global/bulk/types.ts#L83-L88" }, { "attachedBehaviors": [ @@ -19243,7 +19250,7 @@ } } }, - "description": "Allows to perform multiple index/update/delete operations in a single request.", + "description": "Performs multiple indexing or delete operations in a single API call.\nThis reduces overhead and can greatly increase indexing speed.", "generics": [ { "name": "TDocument", @@ -19267,7 +19274,7 @@ }, "path": [ { - "description": "Default index for items which don't provide one", + "description": "Name of the data stream, index, or index alias to perform bulk actions on.", "name": "index", "required": false, "type": { @@ -19281,7 +19288,7 @@ ], "query": [ { - "description": "The pipeline id to preprocess incoming documents with", + "description": "ID of the pipeline to use to preprocess incoming documents.\nIf the index has a default ingest pipeline specified, then setting the value to _none disables the default ingest pipeline for this request.\nIf a final pipeline is configured it will always run, regardless of the value of this parameter.", "name": "pipeline", "required": false, "type": { @@ -19293,9 +19300,10 @@ } }, { - "description": "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.", + "description": "If `true`, Elasticsearch refreshes 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` do nothing with refreshes.\nValid values: `true`, `false`, `wait_for`.", "name": "refresh", "required": false, + "serverDefault": "false", "type": { "kind": "instance_of", "type": { @@ -19305,7 +19313,7 @@ } }, { - "description": "Specific routing value", + "description": "Custom value used to route operations to a specific shard.", "name": "routing", "required": false, "type": { @@ -19317,7 +19325,7 @@ } }, { - "description": "True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request", + "description": "True or false to return the `_source` field or not, or a list of fields to return.", "name": "_source", "required": false, "type": { @@ -19329,7 +19337,7 @@ } }, { - "description": "Default list of fields to exclude from the returned _source field, can be overridden on each sub-request", + "description": "A comma-separated list of source fields to exclude from the response.", "name": "_source_excludes", "required": false, "type": { @@ -19341,7 +19349,7 @@ } }, { - "description": "Default list of fields to extract and return from the _source field, can be overridden on each sub-request", + "description": "A comma-separated list of source fields to include in the response.", "name": "_source_includes", "required": false, "type": { @@ -19353,9 +19361,10 @@ } }, { - "description": "Explicit operation timeout", + "description": "Period each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.", "name": "timeout", "required": false, + "serverDefault": "1m", "type": { "kind": "instance_of", "type": { @@ -19365,9 +19374,10 @@ } }, { - "description": "Sets the number of shard copies that must be active before proceeding with the bulk 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)", + "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).", "name": "wait_for_active_shards", "required": false, + "serverDefault": "1", "type": { "kind": "instance_of", "type": { @@ -19377,9 +19387,10 @@ } }, { - "description": "Sets require_alias for all incoming documents. Defaults to unset (false)", + "description": "If `true`, the request’s actions must target an index alias.", "name": "require_alias", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -19389,7 +19400,7 @@ } } ], - "specLocation": "_global/bulk/BulkRequest.ts#L32-L62" + "specLocation": "_global/bulk/BulkRequest.ts#L32-L103" }, { "body": { @@ -19470,6 +19481,7 @@ }, "properties": [ { + "description": "The document ID associated with the operation.", "name": "_id", "required": false, "type": { @@ -19493,6 +19505,7 @@ } }, { + "description": "Name of the index associated with the operation.\nIf the operation targeted a data stream, this is the backing index into which the document was written.", "name": "_index", "required": true, "type": { @@ -19504,6 +19517,7 @@ } }, { + "description": "HTTP status code returned for the operation.", "name": "status", "required": true, "type": { @@ -19515,6 +19529,7 @@ } }, { + "description": "Contains additional information about the failed operation.\nThe parameter is only returned for failed operations.", "name": "error", "required": false, "type": { @@ -19526,6 +19541,7 @@ } }, { + "description": "The primary term assigned to the document for the operation.", "name": "_primary_term", "required": false, "type": { @@ -19537,6 +19553,7 @@ } }, { + "description": "Result of the operation.\nSuccessful values are `created`, `deleted`, and `updated`.", "name": "result", "required": false, "type": { @@ -19548,6 +19565,7 @@ } }, { + "description": "The sequence number assigned to the document for the operation.\nSequence numbers are used to ensure an older version of a document doesn’t overwrite a newer version.", "name": "_seq_no", "required": false, "type": { @@ -19559,6 +19577,7 @@ } }, { + "description": "Contains shard information for the operation.", "name": "_shards", "required": false, "type": { @@ -19570,6 +19589,7 @@ } }, { + "description": "The document version associated with the operation.\nThe document version is incremented each time the document is updated.", "name": "_version", "required": false, "type": { @@ -19619,7 +19639,7 @@ } } ], - "specLocation": "_global/bulk/types.ts#L37-L49" + "specLocation": "_global/bulk/types.ts#L37-L81" }, { "generics": [ @@ -19727,7 +19747,7 @@ } } ], - "specLocation": "_global/bulk/types.ts#L93-L129" + "specLocation": "_global/bulk/types.ts#L169-L205" }, { "inherits": { @@ -19743,8 +19763,10 @@ }, "properties": [ { + "description": "If `true`, the request’s actions must target an index alias.", "name": "require_alias", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -19765,7 +19787,7 @@ } } ], - "specLocation": "_global/bulk/types.ts#L80-L83" + "specLocation": "_global/bulk/types.ts#L136-L143" }, { "inherits": { @@ -19781,6 +19803,7 @@ }, "properties": [ { + "description": "A map from the full name of fields to the name of dynamic templates.\nDefaults to an empty map.\nIf a name matches a dynamic template, then that template will be applied regardless of other match predicates defined in the template.\nIf a field is already defined in the mapping, then this parameter won’t be used.", "name": "dynamic_templates", "required": false, "type": { @@ -19803,6 +19826,7 @@ } }, { + "description": "ID of the pipeline to use to preprocess incoming documents.\nIf the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request.\nIf a final pipeline is configured it will always run, regardless of the value of this parameter.", "name": "pipeline", "required": false, "type": { @@ -19814,8 +19838,10 @@ } }, { + "description": "If `true`, the request’s actions must target an index alias.", "name": "require_alias", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -19825,7 +19851,7 @@ } } ], - "specLocation": "_global/bulk/types.ts#L68-L72" + "specLocation": "_global/bulk/types.ts#L109-L128" }, { "attachedBehaviors": [ @@ -19835,6 +19861,7 @@ "kind": "properties", "properties": [ { + "description": "Scroll IDs to clear.\nTo clear all scroll IDs, use `_all`.", "name": "scroll_id", "required": false, "type": { @@ -19847,7 +19874,7 @@ } ] }, - "description": "Explicitly clears the search context for a scroll.", + "description": "Clears the search context and results for a scrolling search.", "inherits": { "type": { "name": "RequestBase", @@ -19861,7 +19888,7 @@ }, "path": [ { - "description": "A comma-separated list of scroll IDs to clear", + "description": "Comma-separated list of scroll IDs to clear.\nTo clear all scroll IDs, use `_all`.", "name": "scroll_id", "required": false, "type": { @@ -19874,7 +19901,7 @@ } ], "query": [], - "specLocation": "_global/clear_scroll/ClearScrollRequest.ts#L23-L36" + "specLocation": "_global/clear_scroll/ClearScrollRequest.ts#L23-L45" }, { "body": { @@ -19953,6 +19980,7 @@ "kind": "properties", "properties": [ { + "description": "The ID of the point-in-time.", "name": "id", "required": true, "type": { @@ -19965,7 +19993,7 @@ } ] }, - "description": "Close a point in time", + "description": "Closes a point-in-time.", "inherits": { "type": { "name": "RequestBase", @@ -19979,7 +20007,7 @@ }, "path": [], "query": [], - "specLocation": "_global/close_point_in_time/ClosePointInTimeRequest.ts#L23-L33" + "specLocation": "_global/close_point_in_time/ClosePointInTimeRequest.ts#L23-L37" }, { "body": { diff --git a/specification/_global/bulk/BulkRequest.ts b/specification/_global/bulk/BulkRequest.ts index 2627d733a0..d212e71bac 100644 --- a/specification/_global/bulk/BulkRequest.ts +++ b/specification/_global/bulk/BulkRequest.ts @@ -30,6 +30,8 @@ import { OperationContainer, UpdateAction } from './types' import { SourceConfigParam } from '@global/search/_types/SourceFilter' /** + * Performs multiple indexing or delete operations in a single API call. + * This reduces overhead and can greatly increase indexing speed. * @rest_spec_name bulk * @availability stack since=0.0.0 stability=stable * @availability serverless stability=stable visibility=public @@ -38,23 +40,62 @@ import { SourceConfigParam } from '@global/search/_types/SourceFilter' */ export interface Request extends RequestBase { path_parts: { + /** + * Name of the data stream, index, or index alias to perform bulk actions on. + */ index?: IndexName } query_parameters: { + /** + * ID of the pipeline to use to preprocess incoming documents. + * If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request. + * If a final pipeline is configured it will always run, regardless of the value of this parameter. + */ pipeline?: string + /** + * If `true`, Elasticsearch refreshes 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` do nothing with refreshes. + * Valid values: `true`, `false`, `wait_for`. + * @server_default false + */ refresh?: Refresh + /** + * Custom value used to route operations to a specific shard. + */ routing?: Routing + /** + * `true` or `false` to return the `_source` field or not, or a list of fields to return. + */ _source?: SourceConfigParam + /** + * A comma-separated list of source fields to exclude from the response. + */ _source_excludes?: Fields + /** + * A comma-separated list of source fields to include in the response. + */ _source_includes?: Fields + /** + * Period each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. + * @server_default 1m + */ timeout?: Duration + /** + * The number of shard copies that must be active before proceeding with the operation. + * Set to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). + * @server_default 1 + */ wait_for_active_shards?: WaitForActiveShards + /** + * If `true`, the request’s actions must target an index alias. + * @server_default false + */ require_alias?: boolean } - /** @codegen_name operations */ + /** + * The request body contains a newline-delimited list of `create`, `delete`, `index`, and `update` actions and their associated source data. + * @codegen_name operations */ // This declaration captures action_and_meta_data (OperationContainer) and the two kinds of sources // that can follow: an update action for update operations and anything for index or create operations. - // // /!\ must be kept in sync with BulkMonitoringRequest body?: Array< OperationContainer | UpdateAction | TDocument diff --git a/specification/_global/bulk/types.ts b/specification/_global/bulk/types.ts index 2be264dbb1..c1e427fe60 100644 --- a/specification/_global/bulk/types.ts +++ b/specification/_global/bulk/types.ts @@ -35,14 +35,46 @@ import { Script } from '@_types/Scripting' import { SourceConfig } from '@global/search/_types/SourceFilter' export class ResponseItem { + /** + * The document ID associated with the operation. + */ _id?: string | null + /** + * Name of the index associated with the operation. + * If the operation targeted a data stream, this is the backing index into which the document was written. + */ _index: string + /** + * HTTP status code returned for the operation. + */ status: integer + /** + * Contains additional information about the failed operation. + * The parameter is only returned for failed operations. + */ error?: ErrorCause + /** + * The primary term assigned to the document for the operation. + */ _primary_term?: long + /** + * Result of the operation. + * Successful values are `created`, `deleted`, and `updated`. + */ result?: string + /** + * The sequence number assigned to the document for the operation. + * Sequence numbers are used to ensure an older version of a document doesn’t overwrite a newer version. + */ _seq_no?: SequenceNumber + /** + * Contains shard information for the operation. + */ _shards?: ShardStatistics + /** + * The document version associated with the operation. + * The document version is incremented each time the document is updated. + */ _version?: VersionNumber forced_refresh?: boolean get?: InlineGet> @@ -56,8 +88,17 @@ export enum OperationType { } export class OperationBase { + /** + * The document ID. + */ _id?: Id + /** + * Name of the index or index alias to perform the action on. + */ _index?: IndexName + /** + * Custom value used to route operations to a specific shard. + */ routing?: Routing if_primary_term?: long if_seq_no?: SequenceNumber @@ -66,8 +107,23 @@ export class OperationBase { } export class WriteOperation extends OperationBase { + /** + * A map from the full name of fields to the name of dynamic templates. + * Defaults to an empty map. + * If a name matches a dynamic template, then that template will be applied regardless of other match predicates defined in the template. + * If a field is already defined in the mapping, then this parameter won’t be used. + */ dynamic_templates?: Dictionary + /** + * ID of the pipeline to use to preprocess incoming documents. + * If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request. + * If a final pipeline is configured it will always run, regardless of the value of this parameter. + */ pipeline?: string + /** + * If `true`, the request’s actions must target an index alias. + * @server_default false + */ require_alias?: boolean } @@ -78,15 +134,35 @@ export class IndexOperation extends WriteOperation {} export class DeleteOperation extends OperationBase {} export class UpdateOperation extends OperationBase { + /** + * If `true`, the request’s actions must target an index alias. + * @server_default false + */ require_alias?: boolean retry_on_conflict?: integer } /** @variants container */ export class OperationContainer { + /** + * Indexes the specified document. + * If the document exists, replaces the document and increments the version. + * The following line must contain the source data to be indexed. + */ index?: IndexOperation + /** + * Indexes the specified document if it does not already exist. + * The following line must contain the source data to be indexed. + */ create?: CreateOperation + /** + * Performs a partial document update. + * The following line must contain the partial document and update options. + */ update?: UpdateOperation + /** + * Removes the specified document from the index. + */ delete?: DeleteOperation } diff --git a/specification/_global/clear_scroll/ClearScrollRequest.ts b/specification/_global/clear_scroll/ClearScrollRequest.ts index 9cb5162f54..961cace969 100644 --- a/specification/_global/clear_scroll/ClearScrollRequest.ts +++ b/specification/_global/clear_scroll/ClearScrollRequest.ts @@ -21,6 +21,7 @@ import { RequestBase } from '@_types/Base' import { Ids, ScrollIds } from '@_types/common' /** + * Clears the search context and results for a scrolling search. * @rest_spec_name clear_scroll * @availability stack since=0.0.0 stability=stable * @availability serverless stability=stable visibility=public @@ -28,9 +29,17 @@ import { Ids, ScrollIds } from '@_types/common' */ export interface Request extends RequestBase { path_parts: { + /** + * Comma-separated list of scroll IDs to clear. + * To clear all scroll IDs, use `_all`. + */ scroll_id?: ScrollIds } body: { + /** + * Scroll IDs to clear. + * To clear all scroll IDs, use `_all`. + */ scroll_id?: ScrollIds } } diff --git a/specification/_global/close_point_in_time/ClosePointInTimeRequest.ts b/specification/_global/close_point_in_time/ClosePointInTimeRequest.ts index d46a6d956b..e37a6e0de1 100644 --- a/specification/_global/close_point_in_time/ClosePointInTimeRequest.ts +++ b/specification/_global/close_point_in_time/ClosePointInTimeRequest.ts @@ -21,6 +21,7 @@ import { RequestBase } from '@_types/Base' import { Id } from '@_types/common' /** + * Closes a point-in-time. * @rest_spec_name close_point_in_time * @availability stack since=7.10.0 stability=stable * @availability serverless stability=stable visibility=public @@ -28,6 +29,9 @@ import { Id } from '@_types/common' */ export interface Request extends RequestBase { body: { + /** + * The ID of the point-in-time. + */ id: Id } } From 2bb669c3a2db16b9b483c9e502d859931dc7a018 Mon Sep 17 00:00:00 2001 From: Elastic Machine Date: Tue, 5 Sep 2023 12:38:58 +0000 Subject: [PATCH 3/7] Update specification output --- output/schema/schema.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index 296965a353..9ee0726deb 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -19288,7 +19288,7 @@ ], "query": [ { - "description": "ID of the pipeline to use to preprocess incoming documents.\nIf the index has a default ingest pipeline specified, then setting the value to _none disables the default ingest pipeline for this request.\nIf a final pipeline is configured it will always run, regardless of the value of this parameter.", + "description": "ID of the pipeline to use to preprocess incoming documents.\nIf the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request.\nIf a final pipeline is configured it will always run, regardless of the value of this parameter.", "name": "pipeline", "required": false, "type": { @@ -19325,7 +19325,7 @@ } }, { - "description": "True or false to return the `_source` field or not, or a list of fields to return.", + "description": "`true` or `false` to return the `_source` field or not, or a list of fields to return.", "name": "_source", "required": false, "type": { From ad975f6970d7952925a05475f032ac2c8754fc52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Wed, 6 Sep 2023 17:50:30 +0200 Subject: [PATCH 4/7] [DOCS] Adds description to global APIs part 2 (#2270) Co-authored-by: Abdon Pijpelink --- output/schema/schema.json | 282 +++++++++++------- specification/_global/create/CreateRequest.ts | 43 ++- specification/_global/delete/DeleteRequest.ts | 37 +++ .../delete_by_query/DeleteByQueryRequest.ts | 128 ++++++++ .../DeleteByQueryRethrottleRequest.ts | 6 + .../delete_script/DeleteScriptRequest.ts | 14 + .../_global/get_script/GetScriptRequest.ts | 4 + .../OpenPointInTimeRequest.ts | 20 ++ .../_global/put_script/PutScriptRequest.ts | 22 ++ .../ExecutePainlessScriptRequest.ts | 11 + .../_global/scripts_painless_execute/types.ts | 10 + .../update_by_query/UpdateByQueryRequest.ts | 136 +++++++++ .../UpdateByQueryRethrottleRequest.ts | 7 + 13 files changed, 605 insertions(+), 115 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index 9ee0726deb..6863ddeeff 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -20353,7 +20353,7 @@ } } }, - "description": "Creates a new document in the index.\n\nReturns a 409 response when a document with a same ID already exists in the index.", + "description": "Adds a JSON document to the specified data stream or index and makes it searchable.\nIf the target is an index and the document already exists, the request updates the document and increments its version.", "generics": [ { "name": "TDocument", @@ -20373,7 +20373,7 @@ }, "path": [ { - "description": "Document ID", + "description": "Unique identifier for the document.", "name": "id", "required": true, "type": { @@ -20385,7 +20385,7 @@ } }, { - "description": "The name of the index", + "description": "Name of the data stream or index to target.\nIf the target doesn’t exist and matches the name or wildcard (`*`) pattern of an index template with a `data_stream` definition, this request creates the data stream.\nIf the target doesn’t exist and doesn’t match a data stream template, this request creates the index.", "name": "index", "required": true, "type": { @@ -20399,7 +20399,7 @@ ], "query": [ { - "description": "The pipeline id to preprocess incoming documents with", + "description": "ID of the pipeline to use to preprocess incoming documents.\nIf the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request.\nIf a final pipeline is configured it will always run, regardless of the value of this parameter.", "name": "pipeline", "required": false, "type": { @@ -20411,9 +20411,10 @@ } }, { - "description": "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.", + "description": "If `true`, Elasticsearch refreshes 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` do nothing with refreshes.\nValid values: `true`, `false`, `wait_for`.", "name": "refresh", "required": false, + "serverDefault": "false", "type": { "kind": "instance_of", "type": { @@ -20423,7 +20424,7 @@ } }, { - "description": "Specific routing value", + "description": "Custom value used to route operations to a specific shard.", "name": "routing", "required": false, "type": { @@ -20435,9 +20436,10 @@ } }, { - "description": "Explicit operation timeout", + "description": "Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.", "name": "timeout", "required": false, + "serverDefault": "1m", "type": { "kind": "instance_of", "type": { @@ -20447,7 +20449,7 @@ } }, { - "description": "Explicit version number for concurrency control", + "description": "Explicit version number for concurrency control.\nThe specified version must match the current version of the document for the request to succeed.", "name": "version", "required": false, "type": { @@ -20459,7 +20461,7 @@ } }, { - "description": "Specific version type", + "description": "Specific version type: `external`, `external_gte`.", "name": "version_type", "required": false, "type": { @@ -20471,9 +20473,10 @@ } }, { - "description": "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)", + "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).", "name": "wait_for_active_shards", "required": false, + "serverDefault": "1", "type": { "kind": "instance_of", "type": { @@ -20483,7 +20486,7 @@ } } ], - "specLocation": "_global/create/CreateRequest.ts#L32-L54" + "specLocation": "_global/create/CreateRequest.ts#L32-L95" }, { "body": { @@ -20510,7 +20513,7 @@ "body": { "kind": "no_body" }, - "description": "Removes a document from the index.", + "description": "Removes a JSON document from the specified index.", "inherits": { "type": { "name": "RequestBase", @@ -20524,7 +20527,7 @@ }, "path": [ { - "description": "The document ID", + "description": "Unique identifier for the document.", "name": "id", "required": true, "type": { @@ -20536,7 +20539,7 @@ } }, { - "description": "The name of the index", + "description": "Name of the target index.", "name": "index", "required": true, "type": { @@ -20550,7 +20553,7 @@ ], "query": [ { - "description": "only perform the delete operation if the last operation that has changed the document has the specified primary term", + "description": "Only perform the operation if the document has this primary term.", "name": "if_primary_term", "required": false, "type": { @@ -20562,7 +20565,7 @@ } }, { - "description": "only perform the delete operation if the last operation that has changed the document has the specified sequence number", + "description": "Only perform the operation if the document has this sequence number.", "name": "if_seq_no", "required": false, "type": { @@ -20574,9 +20577,10 @@ } }, { - "description": "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.", + "description": "If `true`, Elasticsearch refreshes 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` do nothing with refreshes.\nValid values: `true`, `false`, `wait_for`.", "name": "refresh", "required": false, + "serverDefault": "false", "type": { "kind": "instance_of", "type": { @@ -20586,7 +20590,7 @@ } }, { - "description": "Specific routing value", + "description": "Custom value used to route operations to a specific shard.", "name": "routing", "required": false, "type": { @@ -20598,9 +20602,10 @@ } }, { - "description": "Explicit operation timeout", + "description": "Period to wait for active shards.", "name": "timeout", "required": false, + "serverDefault": "1m", "type": { "kind": "instance_of", "type": { @@ -20610,7 +20615,7 @@ } }, { - "description": "Explicit version number for concurrency control", + "description": "Explicit version number for concurrency control.\nThe specified version must match the current version of the document for the request to succeed.", "name": "version", "required": false, "type": { @@ -20622,7 +20627,7 @@ } }, { - "description": "Specific version type", + "description": "Specific version type: `external`, `external_gte`.", "name": "version_type", "required": false, "type": { @@ -20634,9 +20639,10 @@ } }, { - "description": "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)", + "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).", "name": "wait_for_active_shards", "required": false, + "serverDefault": "1", "type": { "kind": "instance_of", "type": { @@ -20646,7 +20652,7 @@ } } ], - "specLocation": "_global/delete/DeleteRequest.ts#L34-L54" + "specLocation": "_global/delete/DeleteRequest.ts#L34-L91" }, { "body": { @@ -20704,6 +20710,7 @@ "kind": "properties", "properties": [ { + "description": "The maximum number of documents to delete.", "name": "max_docs", "required": false, "type": { @@ -20715,6 +20722,7 @@ } }, { + "description": "Specifies the documents to delete using the Query DSL.", "name": "query", "required": false, "type": { @@ -20738,7 +20746,7 @@ } ] }, - "description": "Deletes documents matching the provided query.", + "description": "Deletes documents that match the specified query.", "inherits": { "type": { "name": "RequestBase", @@ -20752,7 +20760,7 @@ }, "path": [ { - "description": "A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices", + "description": "Comma-separated list of data streams, indices, and aliases to search.\nSupports wildcards (`*`).\nTo search all data streams or indices, omit this parameter or use `*` or `_all`.", "name": "index", "required": true, "type": { @@ -20766,9 +20774,10 @@ ], "query": [ { - "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", "name": "allow_no_indices", "required": false, + "serverDefault": true, "type": { "kind": "instance_of", "type": { @@ -20778,7 +20787,7 @@ } }, { - "description": "The analyzer to use for the query string", + "description": "Analyzer to use for the query string.", "name": "analyzer", "required": false, "type": { @@ -20790,9 +20799,10 @@ } }, { - "description": "Specify whether wildcard and prefix queries should be analyzed (default: false)", + "description": "If `true`, wildcard and prefix queries are analyzed.", "name": "analyze_wildcard", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -20802,9 +20812,10 @@ } }, { - "description": "What to do when the delete by query hits version conflicts?", + "description": "What to do if delete by query hits version conflicts: `abort` or `proceed`.", "name": "conflicts", "required": false, + "serverDefault": "abort", "type": { "kind": "instance_of", "type": { @@ -20814,9 +20825,10 @@ } }, { - "description": "The default operator for query string query (AND or OR)", + "description": "The default operator for query string query: `AND` or `OR`.", "name": "default_operator", "required": false, + "serverDefault": "OR", "type": { "kind": "instance_of", "type": { @@ -20826,7 +20838,7 @@ } }, { - "description": "The field to use as default where no field prefix is given in the query string", + "description": "Field to use as default where no field prefix is given in the query string.", "name": "df", "required": false, "type": { @@ -20838,9 +20850,10 @@ } }, { - "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.", "name": "expand_wildcards", "required": false, + "serverDefault": "open", "type": { "kind": "instance_of", "type": { @@ -20862,9 +20875,10 @@ } }, { - "description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", "name": "ignore_unavailable", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -20874,9 +20888,10 @@ } }, { - "description": "Specify whether format-based query failures (such as providing text to a numeric field) should be ignored", + "description": "If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.", "name": "lenient", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -20886,7 +20901,7 @@ } }, { - "description": "Maximum number of documents to process (default: all documents)", + "description": "Maximum number of documents to process.\nDefaults to all documents.", "name": "max_docs", "required": false, "type": { @@ -20898,7 +20913,7 @@ } }, { - "description": "Specify the node or shard the operation should be performed on (default: random)", + "description": "Specifies the node or shard the operation should be performed on.\nRandom by default.", "name": "preference", "required": false, "type": { @@ -20910,9 +20925,10 @@ } }, { - "description": "Should the affected indexes be refreshed?", + "description": "If `true`, Elasticsearch refreshes all shards involved in the delete by query after the request completes.", "name": "refresh", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -20922,7 +20938,7 @@ } }, { - "description": "Specify if request cache should be used for this request or not, defaults to index level setting", + "description": "If `true`, the request cache is used for this request.\nDefaults to the index-level setting.", "name": "request_cache", "required": false, "type": { @@ -20934,7 +20950,7 @@ } }, { - "description": "The throttle for this request in sub-requests per second. -1 means no throttle.", + "description": "The throttle for this request in sub-requests per second.", "name": "requests_per_second", "required": false, "type": { @@ -20946,7 +20962,7 @@ } }, { - "description": "A comma-separated list of specific routing values", + "description": "Custom value used to route operations to a specific shard.", "name": "routing", "required": false, "type": { @@ -20958,7 +20974,7 @@ } }, { - "description": "Query in the Lucene query string syntax", + "description": "Query in the Lucene query string syntax.", "name": "q", "required": false, "type": { @@ -20970,7 +20986,7 @@ } }, { - "description": "Specify how long a consistent view of the index should be maintained for scrolled search", + "description": "Period to retain the search context for scrolling.", "name": "scroll", "required": false, "type": { @@ -20982,9 +20998,10 @@ } }, { - "description": "Size on the scroll request powering the delete by query", + "description": "Size of the scroll request that powers the operation.", "name": "scroll_size", "required": false, + "serverDefault": 1000, "type": { "kind": "instance_of", "type": { @@ -20994,7 +21011,7 @@ } }, { - "description": "Explicit timeout for each search request. Defaults to no timeout.", + "description": "Explicit timeout for each search request.\nDefaults to no timeout.", "name": "search_timeout", "required": false, "type": { @@ -21006,7 +21023,7 @@ } }, { - "description": "Search operation type", + "description": "The type of the search operation.\nAvailable options: `query_then_fetch`, `dfs_query_then_fetch`.", "name": "search_type", "required": false, "type": { @@ -21018,9 +21035,10 @@ } }, { - "description": "The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`.", + "description": "The number of slices this task should be divided into.", "name": "slices", "required": false, + "serverDefault": "1", "type": { "kind": "instance_of", "type": { @@ -21030,7 +21048,7 @@ } }, { - "description": "A comma-separated list of : pairs", + "description": "A comma-separated list of : pairs.", "name": "sort", "required": false, "type": { @@ -21045,7 +21063,7 @@ } }, { - "description": "Specific 'tag' of the request for logging and statistical purposes", + "description": "Specific `tag` of the request for logging and statistical purposes.", "name": "stats", "required": false, "type": { @@ -21060,7 +21078,7 @@ } }, { - "description": "The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.", + "description": "Maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\nUse with caution.\nElasticsearch applies this parameter to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.", "name": "terminate_after", "required": false, "type": { @@ -21072,9 +21090,10 @@ } }, { - "description": "Time each individual bulk request should wait for shards that are unavailable.", + "description": "Period each deletion request waits for active shards.", "name": "timeout", "required": false, + "serverDefault": "1m", "type": { "kind": "instance_of", "type": { @@ -21084,7 +21103,7 @@ } }, { - "description": "Specify whether to return document version as part of a hit", + "description": "If `true`, returns the document version as part of a hit.", "name": "version", "required": false, "type": { @@ -21096,9 +21115,10 @@ } }, { - "description": "Sets the number of shard copies that must be active before proceeding with the delete by query 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)", + "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).", "name": "wait_for_active_shards", "required": false, + "serverDefault": "1", "type": { "kind": "instance_of", "type": { @@ -21108,9 +21128,10 @@ } }, { - "description": "Should the request should block until the delete by query is complete.", + "description": "If `true`, the request blocks until the operation is complete.", "name": "wait_for_completion", "required": false, + "serverDefault": true, "type": { "kind": "instance_of", "type": { @@ -21120,7 +21141,7 @@ } } ], - "specLocation": "_global/delete_by_query/DeleteByQueryRequest.ts#L36-L81" + "specLocation": "_global/delete_by_query/DeleteByQueryRequest.ts#L36-L206" }, { "body": { @@ -21362,7 +21383,7 @@ }, "path": [ { - "description": "The task id to rethrottle", + "description": "The ID for the task.", "name": "task_id", "required": true, "type": { @@ -21376,7 +21397,7 @@ ], "query": [ { - "description": "The throttle to set on this request in floating sub-requests per second. -1 means set no throttle.", + "description": "The throttle for this request in sub-requests per second.", "name": "requests_per_second", "required": false, "type": { @@ -21388,7 +21409,7 @@ } } ], - "specLocation": "_global/delete_by_query_rethrottle/DeleteByQueryRethrottleRequest.ts#L24-L35" + "specLocation": "_global/delete_by_query_rethrottle/DeleteByQueryRethrottleRequest.ts#L24-L41" }, { "body": { @@ -21415,7 +21436,7 @@ "body": { "kind": "no_body" }, - "description": "Deletes a script.", + "description": "Deletes a stored script or search template.", "inherits": { "type": { "name": "RequestBase", @@ -21429,7 +21450,7 @@ }, "path": [ { - "description": "Script ID", + "description": "Identifier for the stored script or search template.", "name": "id", "required": true, "type": { @@ -21443,9 +21464,10 @@ ], "query": [ { - "description": "Specify timeout for connection to master", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", "name": "master_timeout", "required": false, + "serverDefault": "30s", "type": { "kind": "instance_of", "type": { @@ -21455,9 +21477,10 @@ } }, { - "description": "Explicit operation timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", "name": "timeout", "required": false, + "serverDefault": "30s", "type": { "kind": "instance_of", "type": { @@ -21467,7 +21490,7 @@ } } ], - "specLocation": "_global/delete_script/DeleteScriptRequest.ts#L24-L37" + "specLocation": "_global/delete_script/DeleteScriptRequest.ts#L24-L51" }, { "body": { @@ -23049,7 +23072,7 @@ "body": { "kind": "no_body" }, - "description": "Returns a script.", + "description": "Retrieves a stored script or search template.", "inherits": { "type": { "name": "RequestBase", @@ -23063,7 +23086,7 @@ }, "path": [ { - "description": "Script ID", + "description": "Identifier for the stored script or search template.", "name": "id", "required": true, "type": { @@ -23089,7 +23112,7 @@ } } ], - "specLocation": "_global/get_script/GetScriptRequest.ts#L24-L37" + "specLocation": "_global/get_script/GetScriptRequest.ts#L24-L41" }, { "body": { @@ -27731,7 +27754,7 @@ ], "query": [ { - "description": "Specific the time to live for the point in time", + "description": "Extends the time to live of the corresponding point in time.", "name": "keep_alive", "required": true, "type": { @@ -27743,9 +27766,10 @@ } }, { - "description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", "name": "ignore_unavailable", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -27755,7 +27779,7 @@ } }, { - "description": "Specify the node or shard the operation should be performed on (default: random)", + "description": "Specifies the node or shard the operation should be performed on.\nRandom by default.", "name": "preference", "required": false, "type": { @@ -27767,7 +27791,7 @@ } }, { - "description": "Specific routing value", + "description": "Custom value used to route operations to a specific shard.", "name": "routing", "required": false, "type": { @@ -27779,9 +27803,10 @@ } }, { - "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.", "name": "expand_wildcards", "required": false, + "serverDefault": "open", "type": { "kind": "instance_of", "type": { @@ -27791,7 +27816,7 @@ } } ], - "specLocation": "_global/open_point_in_time/OpenPointInTimeRequest.ts#L24-L48" + "specLocation": "_global/open_point_in_time/OpenPointInTimeRequest.ts#L24-L68" }, { "body": { @@ -27859,6 +27884,7 @@ "kind": "properties", "properties": [ { + "description": "Contains the script or search template, its parameters, and its language.", "name": "script", "required": true, "type": { @@ -27871,7 +27897,7 @@ } ] }, - "description": "Creates or updates a script.", + "description": "Creates or updates a stored script or search template.", "inherits": { "type": { "name": "RequestBase", @@ -27885,7 +27911,7 @@ }, "path": [ { - "description": "Script ID", + "description": "Identifier for the stored script or search template.\nMust be unique within the cluster.", "name": "id", "required": true, "type": { @@ -27897,7 +27923,7 @@ } }, { - "description": "Script context", + "description": "Context in which the script or search template should run.\nTo prevent errors, the API immediately compiles the script or template in this context.", "name": "context", "required": false, "type": { @@ -27911,9 +27937,10 @@ ], "query": [ { - "description": "Specify timeout for connection to master", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", "name": "master_timeout", "required": false, + "serverDefault": "30s", "type": { "kind": "instance_of", "type": { @@ -27923,9 +27950,10 @@ } }, { - "description": "Explicit operation timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", "name": "timeout", "required": false, + "serverDefault": "30s", "type": { "kind": "instance_of", "type": { @@ -27935,7 +27963,7 @@ } } ], - "specLocation": "_global/put_script/PutScriptRequest.ts#L25-L42" + "specLocation": "_global/put_script/PutScriptRequest.ts#L25-L64" }, { "body": { @@ -29984,6 +30012,7 @@ }, "properties": [ { + "description": "Document that’s temporarily indexed in-memory and accessible from the script.", "name": "document", "required": true, "type": { @@ -29991,6 +30020,7 @@ } }, { + "description": "Index containing a mapping that’s compatible with the indexed document.\nYou may specify a remote index by prefixing the index with the remote cluster alias.", "name": "index", "required": true, "type": { @@ -30002,6 +30032,7 @@ } }, { + "description": "Use this parameter to specify a query for computing a score.", "name": "query", "required": true, "type": { @@ -30013,7 +30044,7 @@ } } ], - "specLocation": "_global/scripts_painless_execute/types.ts#L25-L29" + "specLocation": "_global/scripts_painless_execute/types.ts#L25-L39" }, { "attachedBehaviors": [ @@ -30023,8 +30054,10 @@ "kind": "properties", "properties": [ { + "description": "The context that the script should run in.", "name": "context", "required": false, + "serverDefault": "painless_test", "type": { "kind": "instance_of", "type": { @@ -30034,6 +30067,7 @@ } }, { + "description": "Additional parameters for the `context`.", "name": "context_setup", "required": false, "type": { @@ -30045,6 +30079,7 @@ } }, { + "description": "The Painless script to execute.", "name": "script", "required": false, "type": { @@ -30057,7 +30092,7 @@ } ] }, - "description": "Allows an arbitrary script to be executed and a result to be returned", + "description": "Runs a script and returns a result.", "inherits": { "type": { "name": "RequestBase", @@ -30071,7 +30106,7 @@ }, "path": [], "query": [], - "specLocation": "_global/scripts_painless_execute/ExecutePainlessScriptRequest.ts#L24-L35" + "specLocation": "_global/scripts_painless_execute/ExecutePainlessScriptRequest.ts#L24-L46" }, { "body": { @@ -38662,6 +38697,7 @@ "kind": "properties", "properties": [ { + "description": "The maximum number of documents to update.", "name": "max_docs", "required": false, "type": { @@ -38673,6 +38709,7 @@ } }, { + "description": "Specifies the documents to update using the Query DSL.", "name": "query", "required": false, "type": { @@ -38684,6 +38721,7 @@ } }, { + "description": "The script to run to update the document source or metadata when updating.", "name": "script", "required": false, "type": { @@ -38706,8 +38744,10 @@ } }, { + "description": "What to do if update by query hits version conflicts: `abort` or `proceed`.", "name": "conflicts", "required": false, + "serverDefault": "abort", "type": { "kind": "instance_of", "type": { @@ -38718,7 +38758,7 @@ } ] }, - "description": "Performs an update on every document in the index without changing the source,\nfor example to pick up a mapping change.", + "description": "Updates documents that match the specified query.\nIf no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes.", "inherits": { "type": { "name": "RequestBase", @@ -38732,7 +38772,7 @@ }, "path": [ { - "description": "A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices", + "description": "Comma-separated list of data streams, indices, and aliases to search.\nSupports wildcards (`*`).\nTo search all data streams or indices, omit this parameter or use `*` or `_all`.", "name": "index", "required": true, "type": { @@ -38746,9 +38786,10 @@ ], "query": [ { - "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", "name": "allow_no_indices", "required": false, + "serverDefault": true, "type": { "kind": "instance_of", "type": { @@ -38758,7 +38799,7 @@ } }, { - "description": "The analyzer to use for the query string", + "description": "Analyzer to use for the query string.", "name": "analyzer", "required": false, "type": { @@ -38770,9 +38811,10 @@ } }, { - "description": "Specify whether wildcard and prefix queries should be analyzed (default: false)", + "description": "If `true`, wildcard and prefix queries are analyzed.", "name": "analyze_wildcard", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -38782,9 +38824,10 @@ } }, { - "description": "What to do when the update by query hits version conflicts?", + "description": "What to do if update by query hits version conflicts: `abort` or `proceed`.", "name": "conflicts", "required": false, + "serverDefault": "abort", "type": { "kind": "instance_of", "type": { @@ -38794,9 +38837,10 @@ } }, { - "description": "The default operator for query string query (AND or OR)", + "description": "The default operator for query string query: `AND` or `OR`.", "name": "default_operator", "required": false, + "serverDefault": "OR", "type": { "kind": "instance_of", "type": { @@ -38806,7 +38850,7 @@ } }, { - "description": "The field to use as default where no field prefix is given in the query string", + "description": "Field to use as default where no field prefix is given in the query string.", "name": "df", "required": false, "type": { @@ -38818,7 +38862,7 @@ } }, { - "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `open`, `closed`, `hidden`, `none`.", "name": "expand_wildcards", "required": false, "type": { @@ -38842,9 +38886,10 @@ } }, { - "description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", "name": "ignore_unavailable", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -38854,9 +38899,10 @@ } }, { - "description": "Specify whether format-based query failures (such as providing text to a numeric field) should be ignored", + "description": "If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.", "name": "lenient", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -38866,7 +38912,7 @@ } }, { - "description": "Maximum number of documents to process (default: all documents)", + "description": "Maximum number of documents to process.\nDefaults to all documents.", "name": "max_docs", "required": false, "type": { @@ -38878,7 +38924,7 @@ } }, { - "description": "Ingest pipeline to set on index requests made by this action. (default: none)", + "description": "ID of the pipeline to use to preprocess incoming documents.\nIf the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request.\nIf a final pipeline is configured it will always run, regardless of the value of this parameter.", "name": "pipeline", "required": false, "type": { @@ -38890,7 +38936,7 @@ } }, { - "description": "Specify the node or shard the operation should be performed on (default: random)", + "description": "Specifies the node or shard the operation should be performed on.\nRandom by default.", "name": "preference", "required": false, "type": { @@ -38902,9 +38948,10 @@ } }, { - "description": "Should the affected indexes be refreshed?", + "description": "If `true`, Elasticsearch refreshes affected shards to make the operation visible to search.", "name": "refresh", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -38914,7 +38961,7 @@ } }, { - "description": "Specify if request cache should be used for this request or not, defaults to index level setting", + "description": "If `true`, the request cache is used for this request.", "name": "request_cache", "required": false, "type": { @@ -38926,9 +38973,10 @@ } }, { - "description": "The throttle to set on this request in sub-requests per second. -1 means no throttle.", + "description": "The throttle for this request in sub-requests per second.", "name": "requests_per_second", "required": false, + "serverDefault": -1, "type": { "kind": "instance_of", "type": { @@ -38938,7 +38986,7 @@ } }, { - "description": "A comma-separated list of specific routing values", + "description": "Custom value used to route operations to a specific shard.", "name": "routing", "required": false, "type": { @@ -38950,7 +38998,7 @@ } }, { - "description": "Specify how long a consistent view of the index should be maintained for scrolled search", + "description": "Period to retain the search context for scrolling.", "name": "scroll", "required": false, "type": { @@ -38962,9 +39010,10 @@ } }, { - "description": "Size on the scroll request powering the update by query", + "description": "Size of the scroll request that powers the operation.", "name": "scroll_size", "required": false, + "serverDefault": 1000, "type": { "kind": "instance_of", "type": { @@ -38974,7 +39023,7 @@ } }, { - "description": "Explicit timeout for each search request. Defaults to no timeout.", + "description": "Explicit timeout for each search request.", "name": "search_timeout", "required": false, "type": { @@ -38986,7 +39035,7 @@ } }, { - "description": "Search operation type", + "description": "The type of the search operation. Available options: `query_then_fetch`, `dfs_query_then_fetch`.", "name": "search_type", "required": false, "type": { @@ -38998,9 +39047,10 @@ } }, { - "description": "The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`.", + "description": "The number of slices this task should be divided into.", "name": "slices", "required": false, + "serverDefault": "1", "type": { "kind": "instance_of", "type": { @@ -39010,7 +39060,7 @@ } }, { - "description": "A comma-separated list of : pairs", + "description": "A comma-separated list of : pairs.", "name": "sort", "required": false, "type": { @@ -39025,7 +39075,7 @@ } }, { - "description": "Specific 'tag' of the request for logging and statistical purposes", + "description": "Specific `tag` of the request for logging and statistical purposes.", "name": "stats", "required": false, "type": { @@ -39040,7 +39090,7 @@ } }, { - "description": "The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.", + "description": "Maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\nUse with caution.\nElasticsearch applies this parameter to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.", "name": "terminate_after", "required": false, "type": { @@ -39052,9 +39102,10 @@ } }, { - "description": "Time each individual bulk request should wait for shards that are unavailable.", + "description": "Period each update request waits for the following operations: dynamic mapping updates, waiting for active shards.", "name": "timeout", "required": false, + "serverDefault": "1m", "type": { "kind": "instance_of", "type": { @@ -39064,7 +39115,7 @@ } }, { - "description": "Specify whether to return document version as part of a hit", + "description": "If `true`, returns the document version as part of a hit.", "name": "version", "required": false, "type": { @@ -39088,9 +39139,10 @@ } }, { - "description": "Sets the number of shard copies that must be active before proceeding with the update by query 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)", + "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).", "name": "wait_for_active_shards", "required": false, + "serverDefault": "1", "type": { "kind": "instance_of", "type": { @@ -39100,9 +39152,10 @@ } }, { - "description": "Should the request should block until the update by query operation is complete.", + "description": "If `true`, the request blocks until the operation is complete.", "name": "wait_for_completion", "required": false, + "serverDefault": true, "type": { "kind": "instance_of", "type": { @@ -39112,7 +39165,7 @@ } } ], - "specLocation": "_global/update_by_query/UpdateByQueryRequest.ts#L37-L85" + "specLocation": "_global/update_by_query/UpdateByQueryRequest.ts#L37-L218" }, { "body": { @@ -39354,7 +39407,7 @@ }, "path": [ { - "description": "The task id to rethrottle", + "description": "The ID for the task.", "name": "task_id", "required": true, "type": { @@ -39368,9 +39421,10 @@ ], "query": [ { - "description": "The throttle to set on this request in floating sub-requests per second. -1 means set no throttle.", + "description": "The throttle for this request in sub-requests per second.", "name": "requests_per_second", "required": false, + "serverDefault": -1, "type": { "kind": "instance_of", "type": { @@ -39380,7 +39434,7 @@ } } ], - "specLocation": "_global/update_by_query_rethrottle/UpdateByQueryRethrottleRequest.ts#L24-L35" + "specLocation": "_global/update_by_query_rethrottle/UpdateByQueryRethrottleRequest.ts#L24-L42" }, { "body": { diff --git a/specification/_global/create/CreateRequest.ts b/specification/_global/create/CreateRequest.ts index 5bd38bfb65..31badee6d4 100644 --- a/specification/_global/create/CreateRequest.ts +++ b/specification/_global/create/CreateRequest.ts @@ -30,6 +30,8 @@ import { import { Duration } from '@_types/Time' /** + * Adds a JSON document to the specified data stream or index and makes it searchable. + * If the target is an index and the document already exists, the request updates the document and increments its version. * @rest_spec_name create * @availability stack since=5.0.0 stability=stable * @availability serverless stability=stable visibility=public @@ -37,18 +39,57 @@ import { Duration } from '@_types/Time' */ export interface Request extends RequestBase { path_parts: { + /** + * Unique identifier for the document. + */ id: Id + /** + * Name of the data stream or index to target. + * If the target doesn’t exist and matches the name or wildcard (`*`) pattern of an index template with a `data_stream` definition, this request creates the data stream. + * If the target doesn’t exist and doesn’t match a data stream template, this request creates the index. + */ index: IndexName } query_parameters: { + /** + * ID of the pipeline to use to preprocess incoming documents. + * If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request. + * If a final pipeline is configured it will always run, regardless of the value of this parameter. + */ pipeline?: string + /** + * If `true`, Elasticsearch refreshes 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` do nothing with refreshes. + * Valid values: `true`, `false`, `wait_for`. + * @server_default false + */ refresh?: Refresh + /** + * Custom value used to route operations to a specific shard. + */ routing?: Routing + /** + * Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. + * @server_default 1m + */ timeout?: Duration + /** + * Explicit version number for concurrency control. + * The specified version must match the current version of the document for the request to succeed. + */ version?: VersionNumber + /** + * Specific version type: `external`, `external_gte`. + */ version_type?: VersionType + /** + * The number of shard copies that must be active before proceeding with the operation. + * Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). + * @server_default 1 + */ wait_for_active_shards?: WaitForActiveShards } - /** @codegen_name document */ + /** + * Request body contains the JSON source for the document data. + * @codegen_name document */ body?: TDocument } diff --git a/specification/_global/delete/DeleteRequest.ts b/specification/_global/delete/DeleteRequest.ts index 99980d4891..c311a6a29e 100644 --- a/specification/_global/delete/DeleteRequest.ts +++ b/specification/_global/delete/DeleteRequest.ts @@ -32,23 +32,60 @@ import { long } from '@_types/Numeric' import { Duration } from '@_types/Time' /** + * Removes a JSON document from the specified index. * @rest_spec_name delete * @availability stack since=0.0.0 stability=stable * @availability serverless stability=stable visibility=public */ export interface Request extends RequestBase { path_parts: { + /** + * Unique identifier for the document. + */ id: Id + /** + * Name of the target index. + */ index: IndexName } query_parameters: { + /** + * Only perform the operation if the document has this primary term. + */ if_primary_term?: long + /** + * Only perform the operation if the document has this sequence number. + */ if_seq_no?: SequenceNumber + /** + * If `true`, Elasticsearch refreshes 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` do nothing with refreshes. + * Valid values: `true`, `false`, `wait_for`. + * @server_default false + */ refresh?: Refresh + /** + * Custom value used to route operations to a specific shard. + */ routing?: Routing + /** + * Period to wait for active shards. + * @server_default 1m + */ timeout?: Duration + /** + * Explicit version number for concurrency control. + * The specified version must match the current version of the document for the request to succeed. + */ version?: VersionNumber + /** + * Specific version type: `external`, `external_gte`. + */ version_type?: VersionType + /** + * The number of shard copies that must be active before proceeding with the operation. + * Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). + * @server_default 1 + */ wait_for_active_shards?: WaitForActiveShards } } diff --git a/specification/_global/delete_by_query/DeleteByQueryRequest.ts b/specification/_global/delete_by_query/DeleteByQueryRequest.ts index 7fda378c2b..69f1acb978 100644 --- a/specification/_global/delete_by_query/DeleteByQueryRequest.ts +++ b/specification/_global/delete_by_query/DeleteByQueryRequest.ts @@ -34,48 +34,176 @@ import { Duration } from '@_types/Time' import { Operator } from '@_types/query_dsl/Operator' /** + * Deletes documents that match the specified query. * @rest_spec_name delete_by_query * @availability stack since=5.0.0 stability=stable * @availability serverless stability=stable visibility=public */ export interface Request extends RequestBase { path_parts: { + /** + * Comma-separated list of data streams, indices, and aliases to search. + * Supports wildcards (`*`). + * To search all data streams or indices, omit this parameter or use `*` or `_all`. + */ index: Indices } query_parameters: { + /** + * If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. + * This behavior applies even if the request targets other open indices. + * For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. + * @server_default true + */ allow_no_indices?: boolean + /** + * Analyzer to use for the query string. + */ analyzer?: string + /** + * If `true`, wildcard and prefix queries are analyzed. + * @server_default false + */ analyze_wildcard?: boolean + /** + * What to do if delete by query hits version conflicts: `abort` or `proceed`. + * @server_default abort + */ conflicts?: Conflicts + /** + * The default operator for query string query: `AND` or `OR`. + * @server_default OR + */ default_operator?: Operator + /** + * Field to use as default where no field prefix is given in the query string. + */ df?: string + /** + * Type of index that wildcard patterns can match. + * If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + * Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + * @server_default open + */ expand_wildcards?: ExpandWildcards from?: long + /** + * If `false`, the request returns an error if it targets a missing or closed index. + * @server_default false + */ ignore_unavailable?: boolean + /** + * If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. + * @server_default false + */ lenient?: boolean + /** + * Maximum number of documents to process. + * Defaults to all documents. + */ max_docs?: long + /** + * Specifies the node or shard the operation should be performed on. + * Random by default. + */ preference?: string + /** + * If `true`, Elasticsearch refreshes all shards involved in the delete by query after the request completes. + * @server_default false + */ refresh?: boolean + /** + * If `true`, the request cache is used for this request. + * Defaults to the index-level setting. + */ request_cache?: boolean + /** + * The throttle for this request in sub-requests per second. + */ requests_per_second?: float + /** + * Custom value used to route operations to a specific shard. + */ routing?: Routing + /** + * Query in the Lucene query string syntax. + */ q?: string + /** + * Period to retain the search context for scrolling. + */ scroll?: Duration + /** + * Size of the scroll request that powers the operation. + * @server_default 1000 + */ scroll_size?: long + /** + * Explicit timeout for each search request. + * Defaults to no timeout. + */ search_timeout?: Duration + /** + * The type of the search operation. + * Available options: `query_then_fetch`, `dfs_query_then_fetch`. + */ search_type?: SearchType + /** + * The number of slices this task should be divided into. + * @server_default 1 + */ slices?: Slices + /** + * A comma-separated list of : pairs. + */ sort?: string[] + /** + * Specific `tag` of the request for logging and statistical purposes. + */ stats?: string[] + /** + * Maximum number of documents to collect for each shard. + * If a query reaches this limit, Elasticsearch terminates the query early. + * Elasticsearch collects documents before sorting. + * Use with caution. + * Elasticsearch applies this parameter to each shard handling the request. + * When possible, let Elasticsearch perform early termination automatically. + * Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers. + */ terminate_after?: long + /** + * Period each deletion request waits for active shards. + * @server_default 1m + */ timeout?: Duration + /** + * If `true`, returns the document version as part of a hit. + */ version?: boolean + /** + * The number of shard copies that must be active before proceeding with the operation. + * Set to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). + * @server_default 1 + */ wait_for_active_shards?: WaitForActiveShards + /** + * If `true`, the request blocks until the operation is complete. + * @server_default true + */ wait_for_completion?: boolean } body: { + /** + * The maximum number of documents to delete. + */ max_docs?: long + /** + * Specifies the documents to delete using the Query DSL. + */ query?: QueryContainer + /** + * Slice the request manually using the provided slice ID and total number of slices. + */ slice?: SlicedScroll } } diff --git a/specification/_global/delete_by_query_rethrottle/DeleteByQueryRethrottleRequest.ts b/specification/_global/delete_by_query_rethrottle/DeleteByQueryRethrottleRequest.ts index 3056fba4b7..02b19d417e 100644 --- a/specification/_global/delete_by_query_rethrottle/DeleteByQueryRethrottleRequest.ts +++ b/specification/_global/delete_by_query_rethrottle/DeleteByQueryRethrottleRequest.ts @@ -27,9 +27,15 @@ import { float } from '@_types/Numeric' */ export interface Request extends RequestBase { path_parts: { + /** + * The ID for the task. + */ task_id: TaskId } query_parameters: { + /** + * The throttle for this request in sub-requests per second. + */ requests_per_second?: float } } diff --git a/specification/_global/delete_script/DeleteScriptRequest.ts b/specification/_global/delete_script/DeleteScriptRequest.ts index 904b8dc4c0..63b4e94185 100644 --- a/specification/_global/delete_script/DeleteScriptRequest.ts +++ b/specification/_global/delete_script/DeleteScriptRequest.ts @@ -22,16 +22,30 @@ import { Id } from '@_types/common' import { Duration } from '@_types/Time' /** + * Deletes a stored script or search template. * @rest_spec_name delete_script * @availability stack since=0.0.0 stability=stable * @availability serverless stability=stable visibility=public */ export interface Request extends RequestBase { path_parts: { + /** + * Identifier for the stored script or search template. + */ id: Id } query_parameters: { + /** + * 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. + * @server_default 30s + */ master_timeout?: Duration + /** + * Period to wait for a response. + * If no response is received before the timeout expires, the request fails and returns an error. + * @server_default 30s + */ timeout?: Duration } } diff --git a/specification/_global/get_script/GetScriptRequest.ts b/specification/_global/get_script/GetScriptRequest.ts index 60ad0dc7ba..3f4010ab94 100644 --- a/specification/_global/get_script/GetScriptRequest.ts +++ b/specification/_global/get_script/GetScriptRequest.ts @@ -22,12 +22,16 @@ import { Id } from '@_types/common' import { Duration } from '@_types/Time' /** + * Retrieves a stored script or search template. * @rest_spec_name get_script * @availability stack since=0.0.0 stability=stable * @availability serverless stability=stable visibility=public */ export interface Request extends RequestBase { path_parts: { + /** + * Identifier for the stored script or search template. + */ id: Id } query_parameters: { diff --git a/specification/_global/open_point_in_time/OpenPointInTimeRequest.ts b/specification/_global/open_point_in_time/OpenPointInTimeRequest.ts index 42f5643651..20a2123f28 100644 --- a/specification/_global/open_point_in_time/OpenPointInTimeRequest.ts +++ b/specification/_global/open_point_in_time/OpenPointInTimeRequest.ts @@ -39,10 +39,30 @@ export interface Request extends RequestBase { index: Indices } query_parameters: { + /** + * Extends the time to live of the corresponding point in time. + */ keep_alive: Duration + /** + * If `false`, the request returns an error if it targets a missing or closed index. + * @server_default false + */ ignore_unavailable?: boolean + /** + * Specifies the node or shard the operation should be performed on. + * Random by default. + */ preference?: string + /** + * Custom value used to route operations to a specific shard. + */ routing?: Routing + /** + * Type of index that wildcard patterns can match. + * If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + * Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + * @server_default open + */ expand_wildcards?: ExpandWildcards } } diff --git a/specification/_global/put_script/PutScriptRequest.ts b/specification/_global/put_script/PutScriptRequest.ts index 8f5b804c24..e1bf89bc60 100644 --- a/specification/_global/put_script/PutScriptRequest.ts +++ b/specification/_global/put_script/PutScriptRequest.ts @@ -23,20 +23,42 @@ import { StoredScript } from '@_types/Scripting' import { Duration } from '@_types/Time' /** + * Creates or updates a stored script or search template. * @rest_spec_name put_script * @availability stack since=0.0.0 stability=stable * @availability serverless stability=stable visibility=public */ export interface Request extends RequestBase { path_parts: { + /** + * Identifier for the stored script or search template. + * Must be unique within the cluster. + */ id: Id + /** + * Context in which the script or search template should run. + * To prevent errors, the API immediately compiles the script or template in this context. + */ context?: Name } query_parameters: { + /** + * 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. + * @server_default 30s + */ master_timeout?: Duration + /** + * Period to wait for a response. + * If no response is received before the timeout expires, the request fails and returns an error. + * @server_default 30s + */ timeout?: Duration } body: { + /** + * Contains the script or search template, its parameters, and its language. + */ script: StoredScript } } diff --git a/specification/_global/scripts_painless_execute/ExecutePainlessScriptRequest.ts b/specification/_global/scripts_painless_execute/ExecutePainlessScriptRequest.ts index e7c9605851..eafd1613d2 100644 --- a/specification/_global/scripts_painless_execute/ExecutePainlessScriptRequest.ts +++ b/specification/_global/scripts_painless_execute/ExecutePainlessScriptRequest.ts @@ -22,14 +22,25 @@ import { InlineScript } from '@_types/Scripting' import { PainlessContextSetup } from './types' /** + * Runs a script and returns a result. * @rest_spec_name scripts_painless_execute * @availability stack since=6.3.0 stability=experimental * @availability serverless stability=experimental visibility=public */ export interface Request extends RequestBase { body: { + /** + * The context that the script should run in. + * @server_default painless_test + */ context?: string + /** + * Additional parameters for the `context`. + */ context_setup?: PainlessContextSetup + /** + * The Painless script to execute. + */ script?: InlineScript } } diff --git a/specification/_global/scripts_painless_execute/types.ts b/specification/_global/scripts_painless_execute/types.ts index 8e861909fa..87a6c4df78 100644 --- a/specification/_global/scripts_painless_execute/types.ts +++ b/specification/_global/scripts_painless_execute/types.ts @@ -23,8 +23,18 @@ import { integer } from '@_types/Numeric' import { QueryContainer } from '@_types/query_dsl/abstractions' export class PainlessContextSetup { + /** + * Document that’s temporarily indexed in-memory and accessible from the script. + */ document: UserDefinedValue + /** + * Index containing a mapping that’s compatible with the indexed document. + * You may specify a remote index by prefixing the index with the remote cluster alias. + */ index: IndexName + /** + * Use this parameter to specify a query for computing a score. + */ query: QueryContainer } diff --git a/specification/_global/update_by_query/UpdateByQueryRequest.ts b/specification/_global/update_by_query/UpdateByQueryRequest.ts index e37d645920..4faa5db109 100644 --- a/specification/_global/update_by_query/UpdateByQueryRequest.ts +++ b/specification/_global/update_by_query/UpdateByQueryRequest.ts @@ -35,51 +35,187 @@ import { Duration } from '@_types/Time' import { Operator } from '@_types/query_dsl/Operator' /** + * Updates documents that match the specified query. + * If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes. * @rest_spec_name update_by_query * @availability stack since=2.4.0 stability=stable * @availability serverless stability=stable visibility=public */ export interface Request extends RequestBase { path_parts: { + /** + * Comma-separated list of data streams, indices, and aliases to search. + * Supports wildcards (`*`). + * To search all data streams or indices, omit this parameter or use `*` or `_all`. + */ index: Indices } query_parameters: { + /** + * If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. + * This behavior applies even if the request targets other open indices. + * For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. + * @server_default true + */ allow_no_indices?: boolean + /** + * Analyzer to use for the query string. + */ analyzer?: string + /** + * If `true`, wildcard and prefix queries are analyzed. + * @server_default false + */ analyze_wildcard?: boolean + /** + * What to do if update by query hits version conflicts: `abort` or `proceed`. + * @server_default abort + */ conflicts?: Conflicts + /** + * The default operator for query string query: `AND` or `OR`. + * @server_default OR + */ default_operator?: Operator + /** + * Field to use as default where no field prefix is given in the query string. + */ df?: string + /** + * Type of index that wildcard patterns can match. + * If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + * Supports comma-separated values, such as `open,hidden`. + * Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + */ expand_wildcards?: ExpandWildcards from?: long + /** + * If `false`, the request returns an error if it targets a missing or closed index. + * @server_default false + */ ignore_unavailable?: boolean + /** + * If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. + * @server_default false + */ lenient?: boolean + /** + * Maximum number of documents to process. + * Defaults to all documents. + */ max_docs?: long + /** + * ID of the pipeline to use to preprocess incoming documents. + * If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request. + * If a final pipeline is configured it will always run, regardless of the value of this parameter. + */ pipeline?: string + /** + * Specifies the node or shard the operation should be performed on. + * Random by default. + */ preference?: string + /** + * If `true`, Elasticsearch refreshes affected shards to make the operation visible to search. + * @server_default false + */ refresh?: boolean + /** + * If `true`, the request cache is used for this request. + */ request_cache?: boolean + /** + * The throttle for this request in sub-requests per second. + * @server_default -1 + */ requests_per_second?: float + /** + * Custom value used to route operations to a specific shard. + */ routing?: Routing + /** + * Period to retain the search context for scrolling. + */ scroll?: Duration + /** + * Size of the scroll request that powers the operation. + * @server_default 1000 + */ scroll_size?: long + /** + * Explicit timeout for each search request. + */ search_timeout?: Duration + /** + * The type of the search operation. Available options: `query_then_fetch`, `dfs_query_then_fetch`. + */ search_type?: SearchType + /** + * The number of slices this task should be divided into. + * @server_default 1 + */ slices?: Slices + /** + * A comma-separated list of : pairs. + */ sort?: string[] + /** + * Specific `tag` of the request for logging and statistical purposes. + */ stats?: string[] + /** + * Maximum number of documents to collect for each shard. + * If a query reaches this limit, Elasticsearch terminates the query early. + * Elasticsearch collects documents before sorting. + * Use with caution. + * Elasticsearch applies this parameter to each shard handling the request. + * When possible, let Elasticsearch perform early termination automatically. + * Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers. + */ terminate_after?: long + /** + * Period each update request waits for the following operations: dynamic mapping updates, waiting for active shards. + * @server_default 1m + */ timeout?: Duration + /** + * If `true`, returns the document version as part of a hit. + */ version?: boolean version_type?: boolean + /** + * The number of shard copies that must be active before proceeding with the operation. + * Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). + * @server_default 1 + */ wait_for_active_shards?: WaitForActiveShards + /** + * If `true`, the request blocks until the operation is complete. + * @server_default true + */ wait_for_completion?: boolean } body: { + /** + * The maximum number of documents to update. + */ max_docs?: long + /** + * Specifies the documents to update using the Query DSL. + */ query?: QueryContainer + /** + * The script to run to update the document source or metadata when updating. + */ script?: Script + /** + * Slice the request manually using the provided slice ID and total number of slices. + */ slice?: SlicedScroll + /** + * What to do if update by query hits version conflicts: `abort` or `proceed`. + * @server_default abort + */ conflicts?: Conflicts } } diff --git a/specification/_global/update_by_query_rethrottle/UpdateByQueryRethrottleRequest.ts b/specification/_global/update_by_query_rethrottle/UpdateByQueryRethrottleRequest.ts index 3024820cc8..556c055bbf 100644 --- a/specification/_global/update_by_query_rethrottle/UpdateByQueryRethrottleRequest.ts +++ b/specification/_global/update_by_query_rethrottle/UpdateByQueryRethrottleRequest.ts @@ -27,9 +27,16 @@ import { float, long } from '@_types/Numeric' */ export interface Request extends RequestBase { path_parts: { + /** + * The ID for the task. + */ task_id: Id } query_parameters: { + /** + * The throttle for this request in sub-requests per second. + * @server_default -1 + */ requests_per_second?: float } } From 7d1e6fb99308da22e92bc198b2c8d8c6de085ad2 Mon Sep 17 00:00:00 2001 From: Elastic Machine Date: Wed, 6 Sep 2023 15:51:35 +0000 Subject: [PATCH 5/7] Update specification output --- output/schema/schema.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index 6863ddeeff..84fbe65da0 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -20734,6 +20734,7 @@ } }, { + "description": "Slice the request manually using the provided slice ID and total number of slices.", "name": "slice", "required": false, "type": { @@ -21141,7 +21142,7 @@ } } ], - "specLocation": "_global/delete_by_query/DeleteByQueryRequest.ts#L36-L206" + "specLocation": "_global/delete_by_query/DeleteByQueryRequest.ts#L36-L209" }, { "body": { @@ -38733,6 +38734,7 @@ } }, { + "description": "Slice the request manually using the provided slice ID and total number of slices.", "name": "slice", "required": false, "type": { @@ -39165,7 +39167,7 @@ } } ], - "specLocation": "_global/update_by_query/UpdateByQueryRequest.ts#L37-L218" + "specLocation": "_global/update_by_query/UpdateByQueryRequest.ts#L37-L221" }, { "body": { From 00fbe2f441509a43a4729d0935aad0cfc6c75f54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Thu, 7 Sep 2023 17:47:59 +0200 Subject: [PATCH 6/7] [DOCS] Adds description to global APIs part 3 (#2271) Co-authored-by: Abdon Pijpelink --- output/schema/schema.json | 240 +++++++++++------- .../_global/exists/DocumentExistsRequest.ts | 46 ++++ .../exists_source/SourceExistsRequest.ts | 41 +++ .../_global/explain/ExplainRequest.ts | 52 ++++ specification/_global/get/GetRequest.ts | 7 +- specification/_global/index/IndexRequest.ts | 57 +++++ .../MultiSearchTemplateRequest.ts | 25 ++ .../_global/msearch_template/types.ts | 13 +- .../ReindexRethrottleRequest.ts | 7 + .../_global/reindex_rethrottle/types.ts | 34 +++ .../RenderSearchTemplateRequest.ts | 16 ++ .../search_shards/SearchShardsRequest.ts | 31 +++ .../search_template/SearchTemplateRequest.ts | 55 +++- 13 files changed, 515 insertions(+), 109 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index 84fbe65da0..47c9d9501a 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -21518,7 +21518,7 @@ "body": { "kind": "no_body" }, - "description": "Returns information about whether a document exists in an index.", + "description": "Checks if a document in an index exists.", "inherits": { "type": { "name": "RequestBase", @@ -21532,7 +21532,7 @@ }, "path": [ { - "description": "The document ID", + "description": "Identifier of the document.", "name": "id", "required": true, "type": { @@ -21544,7 +21544,7 @@ } }, { - "description": "The name of the index", + "description": "Comma-separated list of data streams, indices, and aliases.\nSupports wildcards (`*`).", "name": "index", "required": true, "type": { @@ -21558,7 +21558,7 @@ ], "query": [ { - "description": "Specify the node or shard the operation should be performed on (default: random)", + "description": "Specifies the node or shard the operation should be performed on.\nRandom by default.", "name": "preference", "required": false, "type": { @@ -21570,9 +21570,12 @@ } }, { - "description": "Specify whether to perform the operation in realtime or search mode", + "description": "If true, the request is real-time as opposed to near-real-time.", + "docId": "realtime", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/docs-get.html#realtime", "name": "realtime", "required": false, + "serverDefault": true, "type": { "kind": "instance_of", "type": { @@ -21582,9 +21585,10 @@ } }, { - "description": "Refresh the shard containing the document before performing the operation", + "description": "If `true`, Elasticsearch refreshes all shards involved in the delete by query after the request completes.", "name": "refresh", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -21594,7 +21598,9 @@ } }, { - "description": "Specific routing value", + "description": "Target the specified primary shard.", + "docId": "routing", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/docs-get.html#get-routing", "name": "routing", "required": false, "type": { @@ -21606,7 +21612,7 @@ } }, { - "description": "True or false to return the _source field or not, or a list of fields to return", + "description": "True or false to return the _source field or not, or a list of fields to return.", "name": "_source", "required": false, "type": { @@ -21618,7 +21624,7 @@ } }, { - "description": "A list of fields to exclude from the returned _source field", + "description": "A comma-separated list of source fields to exclude in the response.", "name": "_source_excludes", "required": false, "type": { @@ -21630,7 +21636,7 @@ } }, { - "description": "A list of fields to extract and return from the _source field", + "description": "A comma-separated list of source fields to include in the response.", "name": "_source_includes", "required": false, "type": { @@ -21642,7 +21648,7 @@ } }, { - "description": "A comma-separated list of stored fields to return in the response", + "description": "List of stored fields to return as part of a hit.\nIf no fields are specified, no stored fields are included in the response.\nIf this field is specified, the `_source` parameter defaults to false.", "name": "stored_fields", "required": false, "type": { @@ -21654,7 +21660,7 @@ } }, { - "description": "Explicit version number for concurrency control", + "description": "Explicit version number for concurrency control.\nThe specified version must match the current version of the document for the request to succeed.", "name": "version", "required": false, "type": { @@ -21666,7 +21672,7 @@ } }, { - "description": "Specific version type", + "description": "Specific version type: `external`, `external_gte`.", "name": "version_type", "required": false, "type": { @@ -21678,7 +21684,7 @@ } } ], - "specLocation": "_global/exists/DocumentExistsRequest.ts#L31-L53" + "specLocation": "_global/exists/DocumentExistsRequest.ts#L31-L99" }, { "body": { @@ -21698,7 +21704,7 @@ "body": { "kind": "no_body" }, - "description": "Returns information about whether a document source exists in an index.", + "description": "Checks if a document is stored in the `source`.", "inherits": { "type": { "name": "RequestBase", @@ -21712,7 +21718,7 @@ }, "path": [ { - "description": "The document ID", + "description": "Identifier of the document.", "name": "id", "required": true, "type": { @@ -21724,7 +21730,7 @@ } }, { - "description": "The name of the index", + "description": "Comma-separated list of data streams, indices, and aliases.\nSupports wildcards (`*`).", "name": "index", "required": true, "type": { @@ -21738,7 +21744,7 @@ ], "query": [ { - "description": "Specify the node or shard the operation should be performed on (default: random)", + "description": "Specifies the node or shard the operation should be performed on.\nRandom by default.", "name": "preference", "required": false, "type": { @@ -21750,9 +21756,12 @@ } }, { - "description": "Specify whether to perform the operation in realtime or search mode", + "description": "If true, the request is real-time as opposed to near-real-time.", + "docId": "realtime", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/docs-get.html#realtime", "name": "realtime", "required": false, + "serverDefault": true, "type": { "kind": "instance_of", "type": { @@ -21762,9 +21771,10 @@ } }, { - "description": "Refresh the shard containing the document before performing the operation", + "description": "If `true`, Elasticsearch refreshes all shards involved in the delete by query after the request completes.", "name": "refresh", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -21774,7 +21784,9 @@ } }, { - "description": "Specific routing value", + "description": "Target the specified primary shard.", + "docId": "routing", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/docs-get.html#get-routing", "name": "routing", "required": false, "type": { @@ -21786,7 +21798,7 @@ } }, { - "description": "True or false to return the _source field or not, or a list of fields to return", + "description": "True or false to return the _source field or not, or a list of fields to return.", "name": "_source", "required": false, "type": { @@ -21798,7 +21810,7 @@ } }, { - "description": "A list of fields to exclude from the returned _source field", + "description": "A comma-separated list of source fields to exclude in the response.", "name": "_source_excludes", "required": false, "type": { @@ -21810,7 +21822,7 @@ } }, { - "description": "A list of fields to extract and return from the _source field", + "description": "A comma-separated list of source fields to include in the response.", "name": "_source_includes", "required": false, "type": { @@ -21822,7 +21834,7 @@ } }, { - "description": "Explicit version number for concurrency control", + "description": "Explicit version number for concurrency control.\nThe specified version must match the current version of the document for the request to succeed.", "name": "version", "required": false, "type": { @@ -21834,7 +21846,7 @@ } }, { - "description": "Specific version type", + "description": "Specific version type: `external`, `external_gte`.", "name": "version_type", "required": false, "type": { @@ -21846,7 +21858,7 @@ } } ], - "specLocation": "_global/exists_source/SourceExistsRequest.ts#L31-L52" + "specLocation": "_global/exists_source/SourceExistsRequest.ts#L31-L93" }, { "body": { @@ -21959,6 +21971,7 @@ "kind": "properties", "properties": [ { + "description": "Defines the search definition using the Query DSL.", "name": "query", "required": false, "type": { @@ -21971,7 +21984,7 @@ } ] }, - "description": "Returns information about why a specific matches (or doesn't match) a query.", + "description": "Returns information about why a specific document matches (or doesn’t match) a query.", "inherits": { "type": { "name": "RequestBase", @@ -21985,7 +21998,7 @@ }, "path": [ { - "description": "The document ID", + "description": "Defines the document ID.", "name": "id", "required": true, "type": { @@ -21997,7 +22010,7 @@ } }, { - "description": "The name of the index", + "description": "Index names used to limit the request.\nOnly a single index name can be provided to this parameter.", "name": "index", "required": true, "type": { @@ -22011,7 +22024,7 @@ ], "query": [ { - "description": "The analyzer for the query string query", + "description": "Analyzer to use for the query string.\nThis parameter can only be used when the `q` query string parameter is specified.", "name": "analyzer", "required": false, "type": { @@ -22023,9 +22036,10 @@ } }, { - "description": "Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)", + "description": "If `true`, wildcard and prefix queries are analyzed.", "name": "analyze_wildcard", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -22035,9 +22049,10 @@ } }, { - "description": "The default operator for query string query (AND or OR)", + "description": "The default operator for query string query: `AND` or `OR`.", "name": "default_operator", "required": false, + "serverDefault": "OR", "type": { "kind": "instance_of", "type": { @@ -22047,7 +22062,7 @@ } }, { - "description": "The default field for query string query (default: _all)", + "description": "Field to use as default where no field prefix is given in the query string.", "name": "df", "required": false, "type": { @@ -22059,9 +22074,10 @@ } }, { - "description": "Specify whether format-based query failures (such as providing text to a numeric field) should be ignored", + "description": "If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.", "name": "lenient", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -22071,7 +22087,7 @@ } }, { - "description": "Specify the node or shard the operation should be performed on (default: random)", + "description": "Specifies the node or shard the operation should be performed on.\nRandom by default.", "name": "preference", "required": false, "type": { @@ -22083,7 +22099,7 @@ } }, { - "description": "Specific routing value", + "description": "Custom value used to route operations to a specific shard.", "name": "routing", "required": false, "type": { @@ -22095,7 +22111,7 @@ } }, { - "description": "True or false to return the _source field or not, or a list of fields to return", + "description": "True or false to return the `_source` field or not, or a list of fields to return.", "name": "_source", "required": false, "type": { @@ -22107,7 +22123,7 @@ } }, { - "description": "A list of fields to exclude from the returned _source field", + "description": "A comma-separated list of source fields to exclude from the response.", "name": "_source_excludes", "required": false, "type": { @@ -22119,7 +22135,7 @@ } }, { - "description": "A list of fields to extract and return from the _source field", + "description": "A comma-separated list of source fields to include in the response.", "name": "_source_includes", "required": false, "type": { @@ -22131,7 +22147,7 @@ } }, { - "description": "A comma-separated list of stored fields to return in the response", + "description": "A comma-separated list of stored fields to return in the response.", "name": "stored_fields", "required": false, "type": { @@ -22143,7 +22159,7 @@ } }, { - "description": "Query in the Lucene query string syntax", + "description": "Query in the Lucene query string syntax.", "name": "q", "required": false, "type": { @@ -22155,7 +22171,7 @@ } } ], - "specLocation": "_global/explain/ExplainRequest.ts#L26-L52" + "specLocation": "_global/explain/ExplainRequest.ts#L26-L104" }, { "body": { @@ -22879,7 +22895,7 @@ } }, { - "description": "Boolean) If true, the request is real-time as opposed to near-real-time.", + "description": "If true, the request is real-time as opposed to near-real-time.", "docId": "realtime", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/docs-get.html#realtime", "name": "realtime", @@ -22957,7 +22973,7 @@ } }, { - "description": "A comma-separated list of stored fields to return in the response", + "description": "List of stored fields to return as part of a hit.\nIf no fields are specified, no stored fields are included in the response.\nIf this field is specified, the `_source` parameter defaults to false.", "name": "stored_fields", "required": false, "type": { @@ -22993,7 +23009,7 @@ } } ], - "specLocation": "_global/get/GetRequest.ts#L31-L86" + "specLocation": "_global/get/GetRequest.ts#L31-L91" }, { "body": { @@ -24950,7 +24966,7 @@ } } }, - "description": "Creates or updates a document in an index.", + "description": "Adds a JSON document to the specified data stream or index and makes it searchable.\nIf the target is an index and the document already exists, the request updates the document and increments its version.", "generics": [ { "name": "TDocument", @@ -24970,7 +24986,7 @@ }, "path": [ { - "description": "Document ID", + "description": "Unique identifier for the document.", "name": "id", "required": false, "type": { @@ -24982,7 +24998,7 @@ } }, { - "description": "The name of the index", + "description": "Name of the data stream or index to target.", "name": "index", "required": true, "type": { @@ -24996,7 +25012,7 @@ ], "query": [ { - "description": "only perform the index operation if the last operation that has changed the document has the specified primary term", + "description": "Only perform the operation if the document has this primary term.", "name": "if_primary_term", "required": false, "type": { @@ -25008,7 +25024,7 @@ } }, { - "description": "only perform the index operation if the last operation that has changed the document has the specified sequence number", + "description": "Only perform the operation if the document has this sequence number.", "name": "if_seq_no", "required": false, "type": { @@ -25020,7 +25036,7 @@ } }, { - "description": "Explicit operation type. Defaults to `index` for requests with an explicit document ID, and to `create`for requests without an explicit document ID", + "description": "Set to create to only index the document if it does not already exist (put if absent).\nIf a document with the specified `_id` already exists, the indexing operation will fail.\nSame as using the `/_create` endpoint.\nValid values: `index`, `create`.\nIf document id is specified, it defaults to `index`.\nOtherwise, it defaults to `create`.", "name": "op_type", "required": false, "type": { @@ -25032,7 +25048,7 @@ } }, { - "description": "The pipeline id to preprocess incoming documents with", + "description": "ID of the pipeline to use to preprocess incoming documents.\nIf the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request.\nIf a final pipeline is configured it will always run, regardless of the value of this parameter.", "name": "pipeline", "required": false, "type": { @@ -25044,7 +25060,7 @@ } }, { - "description": "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.", + "description": "If `true`, Elasticsearch refreshes 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` do nothing with refreshes.\nValid values: `true`, `false`, `wait_for`.", "name": "refresh", "required": false, "type": { @@ -25056,7 +25072,7 @@ } }, { - "description": "Specific routing value", + "description": "Custom value used to route operations to a specific shard.", "name": "routing", "required": false, "type": { @@ -25068,9 +25084,10 @@ } }, { - "description": "Explicit operation timeout", + "description": "Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.", "name": "timeout", "required": false, + "serverDefault": "1m", "type": { "kind": "instance_of", "type": { @@ -25080,7 +25097,7 @@ } }, { - "description": "Explicit version number for concurrency control", + "description": "Explicit version number for concurrency control.\nThe specified version must match the current version of the document for the request to succeed.", "name": "version", "required": false, "type": { @@ -25092,7 +25109,7 @@ } }, { - "description": "Specific version type", + "description": "Specific version type: `external`, `external_gte`.", "name": "version_type", "required": false, "type": { @@ -25104,9 +25121,10 @@ } }, { - "description": "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)", + "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).", "name": "wait_for_active_shards", "required": false, + "serverDefault": "1", "type": { "kind": "instance_of", "type": { @@ -25116,9 +25134,10 @@ } }, { - "description": "When true, requires destination to be an alias. Default is false", + "description": "If `true`, the destination must be an index alias.", "name": "require_alias", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -25128,7 +25147,7 @@ } } ], - "specLocation": "_global/index/IndexRequest.ts#L35-L60" + "specLocation": "_global/index/IndexRequest.ts#L35-L117" }, { "body": { @@ -26988,7 +27007,7 @@ }, "path": [ { - "description": "A comma-separated list of index names to use as default", + "description": "Comma-separated list of data streams, indices, and aliases to search.\nSupports wildcards (`*`).\nTo search all data streams and indices, omit this parameter or use `*`.", "name": "index", "required": false, "type": { @@ -27002,9 +27021,10 @@ ], "query": [ { - "description": "Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution", + "description": "If `true`, network round-trips are minimized for cross-cluster search requests.", "name": "ccs_minimize_roundtrips", "required": false, + "serverDefault": true, "type": { "kind": "instance_of", "type": { @@ -27014,7 +27034,7 @@ } }, { - "description": "Controls the maximum number of concurrent searches the multi search api will execute", + "description": "Maximum number of concurrent searches the API can run.", "name": "max_concurrent_searches", "required": false, "type": { @@ -27026,7 +27046,7 @@ } }, { - "description": "Search operation type", + "description": "The type of the search operation.\nAvailable options: `query_then_fetch`, `dfs_query_then_fetch`.", "name": "search_type", "required": false, "type": { @@ -27038,9 +27058,10 @@ } }, { - "description": "Indicates whether hits.total should be rendered as an integer or an object in the rest search response", + "description": "If `true`, the response returns hits.total as an integer.\nIf `false`, it returns hits.total as an object.", "name": "rest_total_hits_as_int", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -27050,9 +27071,10 @@ } }, { - "description": "Specify whether aggregation and suggester names should be prefixed by their respective types in the response", + "description": "If `true`, the response prefixes aggregation and suggester names with their respective types.", "name": "typed_keys", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -27062,7 +27084,7 @@ } } ], - "specLocation": "_global/msearch_template/MultiSearchTemplateRequest.ts#L25-L45" + "specLocation": "_global/msearch_template/MultiSearchTemplateRequest.ts#L25-L70" }, { "codegenNames": [ @@ -27136,6 +27158,7 @@ }, "properties": [ { + "description": "If `true`, returns detailed information about score calculation as part of each hit.", "name": "explain", "required": false, "serverDefault": false, @@ -27160,6 +27183,7 @@ } }, { + "description": "Key-value pairs used to replace Mustache variables in the template.\nThe key is the variable name.\nThe value is the variable value.", "name": "params", "required": false, "type": { @@ -27178,6 +27202,7 @@ } }, { + "description": "If `true`, the query execution is profiled.", "name": "profile", "required": false, "serverDefault": false, @@ -27202,7 +27227,7 @@ } } ], - "specLocation": "_global/msearch_template/types.ts#L28-L45" + "specLocation": "_global/msearch_template/types.ts#L28-L54" }, { "kind": "interface", @@ -29511,6 +29536,7 @@ }, "properties": [ { + "description": "The number of scroll responses pulled back by the reindex.", "name": "batches", "required": true, "type": { @@ -29522,6 +29548,7 @@ } }, { + "description": "The number of documents that were successfully created.", "name": "created", "required": true, "type": { @@ -29533,6 +29560,7 @@ } }, { + "description": "The number of documents that were successfully deleted.", "name": "deleted", "required": true, "type": { @@ -29544,6 +29572,7 @@ } }, { + "description": "The number of documents that were ignored because the script used for the reindex returned a `noop` value for `ctx.op`.", "name": "noops", "required": true, "type": { @@ -29555,6 +29584,7 @@ } }, { + "description": "The number of requests per second effectively executed during the reindex.", "name": "requests_per_second", "required": true, "type": { @@ -29566,6 +29596,7 @@ } }, { + "description": "The number of retries attempted by reindex. `bulk` is the number of bulk actions retried and `search` is the number of search actions retried.", "name": "retries", "required": true, "type": { @@ -29577,6 +29608,7 @@ } }, { + "description": "", "name": "throttled", "required": false, "type": { @@ -29588,6 +29620,7 @@ } }, { + "description": "Number of milliseconds the request slept to conform to `requests_per_second`.", "name": "throttled_millis", "required": true, "type": { @@ -29619,6 +29652,7 @@ } }, { + "description": "This field should always be equal to zero in a `_reindex` response.\nIt only has meaning when using the Task API, where it indicates the next time (in milliseconds since epoch) a throttled request will be executed again in order to conform to `requests_per_second`.", "name": "throttled_until_millis", "required": true, "type": { @@ -29639,6 +29673,7 @@ } }, { + "description": "The number of documents that were successfully processed.", "name": "total", "required": true, "type": { @@ -29650,6 +29685,7 @@ } }, { + "description": "The number of documents that were successfully updated, for example, a document with same ID already existed prior to reindex updating it.", "name": "updated", "required": true, "type": { @@ -29661,6 +29697,7 @@ } }, { + "description": "The number of version conflicts that reindex hits.", "name": "version_conflicts", "required": true, "type": { @@ -29672,7 +29709,7 @@ } } ], - "specLocation": "_global/reindex_rethrottle/types.ts#L37-L51" + "specLocation": "_global/reindex_rethrottle/types.ts#L37-L88" }, { "kind": "interface", @@ -29810,7 +29847,7 @@ } } ], - "specLocation": "_global/reindex_rethrottle/types.ts#L53-L64" + "specLocation": "_global/reindex_rethrottle/types.ts#L90-L101" }, { "attachedBehaviors": [ @@ -29819,7 +29856,7 @@ "body": { "kind": "no_body" }, - "description": "Changes the number of requests per second for a particular Reindex operation.", + "description": "Copies documents from a source to a destination.", "inherits": { "type": { "name": "RequestBase", @@ -29833,7 +29870,7 @@ }, "path": [ { - "description": "The task id to rethrottle", + "description": "Identifier for the task.", "name": "task_id", "required": true, "type": { @@ -29847,7 +29884,7 @@ ], "query": [ { - "description": "The throttle to set on this request in floating sub-requests per second. -1 means set no throttle.", + "description": "The throttle for this request in sub-requests per second.", "name": "requests_per_second", "required": false, "type": { @@ -29859,7 +29896,7 @@ } } ], - "specLocation": "_global/reindex_rethrottle/ReindexRethrottleRequest.ts#L24-L35" + "specLocation": "_global/reindex_rethrottle/ReindexRethrottleRequest.ts#L24-L42" }, { "body": { @@ -29915,6 +29952,7 @@ } }, { + "description": "Key-value pairs used to replace Mustache variables in the template.\nThe key is the variable name.\nThe value is the variable value.", "name": "params", "required": false, "type": { @@ -29933,6 +29971,7 @@ } }, { + "description": "An inline search template.\nSupports the same parameters as the search API's request body.\nThese parameters also support Mustache variables.\nIf no `id` or `` is specified, this parameter is required.", "name": "source", "required": false, "type": { @@ -29945,7 +29984,7 @@ } ] }, - "description": "Allows to use the Mustache language to pre-render a search definition.", + "description": "Renders a search template as a search request body.", "inherits": { "type": { "name": "RequestBase", @@ -29959,7 +29998,7 @@ }, "path": [ { - "description": "The id of the stored search template", + "description": "ID of the search template to render.\nIf no `source` is specified, this or the `id` request body parameter is required.", "name": "id", "required": false, "type": { @@ -29972,7 +30011,7 @@ } ], "query": [], - "specLocation": "_global/render_search_template/RenderSearchTemplateRequest.ts#L25-L39" + "specLocation": "_global/render_search_template/RenderSearchTemplateRequest.ts#L25-L55" }, { "body": { @@ -36803,7 +36842,7 @@ }, "path": [ { - "description": "A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices", + "description": "Returns the indices and shards that a search request would be executed against.", "name": "index", "required": false, "type": { @@ -36817,9 +36856,10 @@ ], "query": [ { - "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", "name": "allow_no_indices", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -36829,9 +36869,10 @@ } }, { - "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `open`, `closed`, `hidden`, `none`.", "name": "expand_wildcards", "required": false, + "serverDefault": "open", "type": { "kind": "instance_of", "type": { @@ -36841,9 +36882,10 @@ } }, { - "description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", "name": "ignore_unavailable", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -36853,9 +36895,10 @@ } }, { - "description": "Return local information, do not retrieve the state from master node (default: false)", + "description": "If `true`, the request retrieves information from the local node only.", "name": "local", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -36865,7 +36908,7 @@ } }, { - "description": "Specify the node or shard the operation should be performed on (default: random)", + "description": "Specifies the node or shard the operation should be performed on.\nRandom by default.", "name": "preference", "required": false, "type": { @@ -36877,7 +36920,7 @@ } }, { - "description": "Specific routing value", + "description": "Custom value used to route operations to a specific shard.", "name": "routing", "required": false, "type": { @@ -36889,7 +36932,7 @@ } } ], - "specLocation": "_global/search_shards/SearchShardsRequest.ts#L23-L39" + "specLocation": "_global/search_shards/SearchShardsRequest.ts#L23-L70" }, { "body": { @@ -37008,6 +37051,7 @@ "kind": "properties", "properties": [ { + "description": "If `true`, returns detailed information about score calculation as part of each hit.", "name": "explain", "required": false, "serverDefault": false, @@ -37032,6 +37076,7 @@ } }, { + "description": "Key-value pairs used to replace Mustache variables in the template.\nThe key is the variable name.\nThe value is the variable value.", "name": "params", "required": false, "type": { @@ -37050,6 +37095,7 @@ } }, { + "description": "If `true`, the query execution is profiled.", "name": "profile", "required": false, "serverDefault": false, @@ -37075,7 +37121,7 @@ } ] }, - "description": "Allows to use the Mustache language to pre-render a search definition.", + "description": "Runs a search with a search template.", "inherits": { "type": { "name": "RequestBase", @@ -37103,7 +37149,7 @@ ], "query": [ { - "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)", + "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.\nFor example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.", "name": "allow_no_indices", "required": false, "serverDefault": true, @@ -37116,7 +37162,7 @@ } }, { - "description": "Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution", + "description": "If `true`, network round-trips are minimized for cross-cluster search requests.", "name": "ccs_minimize_roundtrips", "required": false, "serverDefault": false, @@ -37129,7 +37175,7 @@ } }, { - "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", + "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `open`, `closed`, `hidden`, `none`.", "name": "expand_wildcards", "required": false, "type": { @@ -37141,7 +37187,7 @@ } }, { - "description": "Specify whether to return detailed information about score computation as part of a hit", + "description": "If `true`, the response includes additional details about score computation as part of a hit.", "name": "explain", "required": false, "serverDefault": false, @@ -37154,7 +37200,7 @@ } }, { - "description": "Whether specified concrete, expanded or aliased indices should be ignored when throttled", + "description": "If `true`, specified concrete, expanded, or aliased indices are not included in the response when throttled.", "name": "ignore_throttled", "required": false, "serverDefault": true, @@ -37167,7 +37213,7 @@ } }, { - "description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", "name": "ignore_unavailable", "required": false, "serverDefault": false, @@ -37180,7 +37226,7 @@ } }, { - "description": "Specify the node or shard the operation should be performed on (default: random)", + "description": "Specifies the node or shard the operation should be performed on.\nRandom by default.", "name": "preference", "required": false, "type": { @@ -37192,7 +37238,7 @@ } }, { - "description": "Specify whether to profile the query execution", + "description": "If `true`, the query execution is profiled.", "name": "profile", "required": false, "serverDefault": false, @@ -37261,7 +37307,7 @@ } }, { - "description": "Specify whether aggregation and suggester names should be prefixed by their respective types in the response", + "description": "If `true`, the response prefixes aggregation and suggester names with their respective types.", "name": "typed_keys", "required": false, "serverDefault": false, @@ -37274,7 +37320,7 @@ } } ], - "specLocation": "_global/search_template/SearchTemplateRequest.ts#L32-L97" + "specLocation": "_global/search_template/SearchTemplateRequest.ts#L32-L134" }, { "body": { diff --git a/specification/_global/exists/DocumentExistsRequest.ts b/specification/_global/exists/DocumentExistsRequest.ts index dcde4be552..b708d644f7 100644 --- a/specification/_global/exists/DocumentExistsRequest.ts +++ b/specification/_global/exists/DocumentExistsRequest.ts @@ -29,25 +29,71 @@ import { import { SourceConfigParam } from '@global/search/_types/SourceFilter' /** + * Checks if a document in an index exists. * @rest_spec_name exists * @availability stack since=0.0.0 stability=stable * @availability serverless stability=stable visibility=public */ export interface Request extends RequestBase { path_parts: { + /** + * Identifier of the document. + */ id: Id + /** + * Comma-separated list of data streams, indices, and aliases. + * Supports wildcards (`*`). + */ index: IndexName } query_parameters: { + /** + * Specifies the node or shard the operation should be performed on. + * Random by default. + */ preference?: string + /** + * If `true`, the request is real-time as opposed to near-real-time. + * @server_default true + * @doc_id realtime + */ realtime?: boolean + /** + * If `true`, Elasticsearch refreshes all shards involved in the delete by query after the request completes. + * @server_default false + */ refresh?: boolean + /** + * Target the specified primary shard. + * @doc_id routing + */ routing?: Routing + /** + * `true` or `false` to return the `_source` field or not, or a list of fields to return. + */ _source?: SourceConfigParam + /** + * A comma-separated list of source fields to exclude in the response. + */ _source_excludes?: Fields + /** + * A comma-separated list of source fields to include in the response. + */ _source_includes?: Fields + /** + * List of stored fields to return as part of a hit. + * If no fields are specified, no stored fields are included in the response. + * If this field is specified, the `_source` parameter defaults to false. + */ stored_fields?: Fields + /** + * Explicit version number for concurrency control. + * The specified version must match the current version of the document for the request to succeed. + */ version?: VersionNumber + /** + * Specific version type: `external`, `external_gte`. + */ version_type?: VersionType } } diff --git a/specification/_global/exists_source/SourceExistsRequest.ts b/specification/_global/exists_source/SourceExistsRequest.ts index aefa7ef041..440eb819ef 100644 --- a/specification/_global/exists_source/SourceExistsRequest.ts +++ b/specification/_global/exists_source/SourceExistsRequest.ts @@ -29,24 +29,65 @@ import { import { SourceConfigParam } from '@global/search/_types/SourceFilter' /** + * Checks if a document's `_source` is stored. * @rest_spec_name exists_source * @availability stack since=5.4.0 stability=stable * @availability serverless stability=stable visibility=public */ export interface Request extends RequestBase { path_parts: { + /** + * Identifier of the document. + */ id: Id + /** + * Comma-separated list of data streams, indices, and aliases. + * Supports wildcards (`*`). + */ index: IndexName } query_parameters: { + /** + * Specifies the node or shard the operation should be performed on. + * Random by default. + */ preference?: string + /** + * If true, the request is real-time as opposed to near-real-time. + * @server_default true + * @doc_id realtime + */ realtime?: boolean + /** + * If `true`, Elasticsearch refreshes all shards involved in the delete by query after the request completes. + * @server_default false + */ refresh?: boolean + /** + * Target the specified primary shard. + * @doc_id routing + */ routing?: Routing + /** + * `true` or `false` to return the `_source` field or not, or a list of fields to return. + */ _source?: SourceConfigParam + /** + * A comma-separated list of source fields to exclude in the response. + */ _source_excludes?: Fields + /** + * A comma-separated list of source fields to include in the response. + */ _source_includes?: Fields + /** + * Explicit version number for concurrency control. + * The specified version must match the current version of the document for the request to succeed. + */ version?: VersionNumber + /** + * Specific version type: `external`, `external_gte`. + */ version_type?: VersionType } } diff --git a/specification/_global/explain/ExplainRequest.ts b/specification/_global/explain/ExplainRequest.ts index 1e79ba8148..3fe5de0fa2 100644 --- a/specification/_global/explain/ExplainRequest.ts +++ b/specification/_global/explain/ExplainRequest.ts @@ -24,29 +24,81 @@ import { SourceConfigParam } from '@global/search/_types/SourceFilter' import { Operator } from '@_types/query_dsl/Operator' /** + * Returns information about why a specific document matches (or doesn’t match) a query. * @rest_spec_name explain * @availability stack since=0.0.0 stability=stable */ export interface Request extends RequestBase { path_parts: { + /** + * Defines the document ID. + */ id: Id + /** + * Index names used to limit the request. + * Only a single index name can be provided to this parameter. + */ index: IndexName } query_parameters: { + /** + * Analyzer to use for the query string. + * This parameter can only be used when the `q` query string parameter is specified. + */ analyzer?: string + /** + * If `true`, wildcard and prefix queries are analyzed. + * @server_default false + */ analyze_wildcard?: boolean + /** + * The default operator for query string query: `AND` or `OR`. + * @server_default OR + */ default_operator?: Operator + /** + * Field to use as default where no field prefix is given in the query string. + */ df?: string + /** + * If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. + * @server_default false + */ lenient?: boolean + /** + * Specifies the node or shard the operation should be performed on. + * Random by default. + */ preference?: string + /** + * Custom value used to route operations to a specific shard. + */ routing?: Routing + /** + * True or false to return the `_source` field or not, or a list of fields to return. + */ _source?: SourceConfigParam + /** + * A comma-separated list of source fields to exclude from the response. + */ _source_excludes?: Fields + /** + * A comma-separated list of source fields to include in the response. + */ _source_includes?: Fields + /** + * A comma-separated list of stored fields to return in the response. + */ stored_fields?: Fields + /** + * Query in the Lucene query string syntax. + */ q?: string } body: { + /** + * Defines the search definition using the Query DSL. + */ query?: QueryContainer } } diff --git a/specification/_global/get/GetRequest.ts b/specification/_global/get/GetRequest.ts index 7e03efa8b8..16ef920076 100644 --- a/specification/_global/get/GetRequest.ts +++ b/specification/_global/get/GetRequest.ts @@ -46,7 +46,7 @@ export interface Request extends RequestBase { */ preference?: string /** - * Boolean) If true, the request is real-time as opposed to near-real-time. + * If `true`, the request is real-time as opposed to near-real-time. * @server_default true * @doc_id realtime */ @@ -73,6 +73,11 @@ export interface Request extends RequestBase { * A comma-separated list of source fields to include in the response. */ _source_includes?: Fields + /** + * List of stored fields to return as part of a hit. + * If no fields are specified, no stored fields are included in the response. + * If this field is specified, the `_source` parameter defaults to false. + */ stored_fields?: Fields /** * Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed. diff --git a/specification/_global/index/IndexRequest.ts b/specification/_global/index/IndexRequest.ts index dd8c4daa7f..4056890c48 100644 --- a/specification/_global/index/IndexRequest.ts +++ b/specification/_global/index/IndexRequest.ts @@ -33,28 +33,85 @@ import { long } from '@_types/Numeric' import { Duration } from '@_types/Time' /** + * Adds a JSON document to the specified data stream or index and makes it searchable. + * If the target is an index and the document already exists, the request updates the document and increments its version. * @rest_spec_name index * @availability stack since=0.0.0 stability=stable * @availability serverless stability=stable visibility=public */ export interface Request extends RequestBase { path_parts: { + /** + * Unique identifier for the document. + */ id?: Id + /** + * Name of the data stream or index to target. + */ index: IndexName } query_parameters: { + /** + * Only perform the operation if the document has this primary term. + */ if_primary_term?: long + /** + * Only perform the operation if the document has this sequence number. + */ if_seq_no?: SequenceNumber + /** + * Set to create to only index the document if it does not already exist (put if absent). + * If a document with the specified `_id` already exists, the indexing operation will fail. + * Same as using the `/_create` endpoint. + * Valid values: `index`, `create`. + * If document id is specified, it defaults to `index`. + * Otherwise, it defaults to `create`. + */ op_type?: OpType + /** + * ID of the pipeline to use to preprocess incoming documents. + * If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request. + * If a final pipeline is configured it will always run, regardless of the value of this parameter. + */ pipeline?: string + /** + * If `true`, Elasticsearch refreshes 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` do nothing with refreshes. + * Valid values: `true`, `false`, `wait_for`. + */ refresh?: Refresh + /** + * Custom value used to route operations to a specific shard. + */ routing?: Routing + /** + * Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. + * @server_default 1m + */ timeout?: Duration + /** + * Explicit version number for concurrency control. + * The specified version must match the current version of the document for the request to succeed. + */ version?: VersionNumber + /** + * Specific version type: `external`, `external_gte`. + */ version_type?: VersionType + /** + * The number of shard copies that must be active before proceeding with the operation. + * Set to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). + * @server_default 1 + */ wait_for_active_shards?: WaitForActiveShards + /** + * If `true`, the destination must be an index alias. + * @server_default false + */ require_alias?: boolean } /** @codegen_name document */ + /** + * Request body contains the JSON source for the document data. + */ body?: TDocument } diff --git a/specification/_global/msearch_template/MultiSearchTemplateRequest.ts b/specification/_global/msearch_template/MultiSearchTemplateRequest.ts index 17a696cca0..e2ce4035e5 100644 --- a/specification/_global/msearch_template/MultiSearchTemplateRequest.ts +++ b/specification/_global/msearch_template/MultiSearchTemplateRequest.ts @@ -31,13 +31,38 @@ import { RequestItem } from './types' */ export interface Request extends RequestBase { path_parts: { + /** + * Comma-separated list of data streams, indices, and aliases to search. + * Supports wildcards (`*`). + * To search all data streams and indices, omit this parameter or use `*`. + */ index?: Indices } query_parameters: { + /** + * If `true`, network round-trips are minimized for cross-cluster search requests. + * @server_default true + */ ccs_minimize_roundtrips?: boolean + /** + * Maximum number of concurrent searches the API can run. + */ max_concurrent_searches?: long + /** + * The type of the search operation. + * Available options: `query_then_fetch`, `dfs_query_then_fetch`. + */ search_type?: SearchType + /** + * If `true`, the response returns `hits.total` as an integer. + * If `false`, it returns `hits.total` as an object. + * @server_default false + */ rest_total_hits_as_int?: boolean + /** + * If `true`, the response prefixes aggregation and suggester names with their respective types. + * @server_default false + */ typed_keys?: boolean } /** @codegen_name search_templates */ diff --git a/specification/_global/msearch_template/types.ts b/specification/_global/msearch_template/types.ts index 59d71c35ec..88114b1e8e 100644 --- a/specification/_global/msearch_template/types.ts +++ b/specification/_global/msearch_template/types.ts @@ -26,15 +26,24 @@ import { MultisearchHeader } from '@global/msearch/types' export type RequestItem = MultisearchHeader | TemplateConfig export class TemplateConfig { - /** @server_default false */ + /** + * If `true`, returns detailed information about score calculation as part of each hit. + * @server_default false */ explain?: boolean /** * ID of the search template to use. If no source is specified, * this parameter is required. */ id?: Id + /** + * Key-value pairs used to replace Mustache variables in the template. + * The key is the variable name. + * The value is the variable value. + */ params?: Dictionary - /** @server_default false */ + /** + * If `true`, the query execution is profiled. + * @server_default false */ profile?: boolean /** * An inline search template. Supports the same parameters as the search API's diff --git a/specification/_global/reindex_rethrottle/ReindexRethrottleRequest.ts b/specification/_global/reindex_rethrottle/ReindexRethrottleRequest.ts index 7087131747..053b451b4b 100644 --- a/specification/_global/reindex_rethrottle/ReindexRethrottleRequest.ts +++ b/specification/_global/reindex_rethrottle/ReindexRethrottleRequest.ts @@ -22,14 +22,21 @@ import { Id } from '@_types/common' import { float } from '@_types/Numeric' /** + * Copies documents from a source to a destination. * @rest_spec_name reindex_rethrottle * @availability stack since=2.4.0 stability=stable */ export interface Request extends RequestBase { path_parts: { + /** + * Identifier for the task. + */ task_id: Id } query_parameters: { + /** + * The throttle for this request in sub-requests per second. + */ requests_per_second?: float } } diff --git a/specification/_global/reindex_rethrottle/types.ts b/specification/_global/reindex_rethrottle/types.ts index e717a6eb57..5fd1f8dfe6 100644 --- a/specification/_global/reindex_rethrottle/types.ts +++ b/specification/_global/reindex_rethrottle/types.ts @@ -35,18 +35,52 @@ export class ReindexNode extends BaseNode { } export class ReindexStatus { + /** + * The number of scroll responses pulled back by the reindex. + */ batches: long + /** + * The number of documents that were successfully created. + */ created: long + /** + * The number of documents that were successfully deleted. + */ deleted: long + /** + * The number of documents that were ignored because the script used for the reindex returned a `noop` value for `ctx.op`. + */ noops: long + /** + * The number of requests per second effectively executed during the reindex. + */ requests_per_second: float + /** + * The number of retries attempted by reindex. `bulk` is the number of bulk actions retried and `search` is the number of search actions retried. + */ retries: Retries throttled?: Duration + /** + * Number of milliseconds the request slept to conform to `requests_per_second`. + */ throttled_millis: DurationValue throttled_until?: Duration + /** + * This field should always be equal to zero in a `_reindex` response. + * It only has meaning when using the Task API, where it indicates the next time (in milliseconds since epoch) a throttled request will be executed again in order to conform to `requests_per_second`. + */ throttled_until_millis: DurationValue + /** + * The number of documents that were successfully processed. + */ total: long + /** + * The number of documents that were successfully updated, for example, a document with same ID already existed prior to reindex updating it. + */ updated: long + /** + * The number of version conflicts that reindex hits. + */ version_conflicts: long } diff --git a/specification/_global/render_search_template/RenderSearchTemplateRequest.ts b/specification/_global/render_search_template/RenderSearchTemplateRequest.ts index 5591bc4c41..3f388e0b1c 100644 --- a/specification/_global/render_search_template/RenderSearchTemplateRequest.ts +++ b/specification/_global/render_search_template/RenderSearchTemplateRequest.ts @@ -23,17 +23,33 @@ import { RequestBase } from '@_types/Base' import { Id } from '@_types/common' /** + * Renders a search template as a search request body. * @rest_spec_name render_search_template * @availability stack since=0.0.0 stability=stable * @availability serverless stability=stable visibility=public */ export interface Request extends RequestBase { path_parts: { + /** + * ID of the search template to render. + * If no `source` is specified, this or the `id` request body parameter is required. + */ id?: Id } body: { file?: string + /** + * Key-value pairs used to replace Mustache variables in the template. + * The key is the variable name. + * The value is the variable value. + */ params?: Dictionary + /** + * An inline search template. + * Supports the same parameters as the search API's request body. + * These parameters also support Mustache variables. + * If no `id` or `` is specified, this parameter is required. + */ source?: string } } diff --git a/specification/_global/search_shards/SearchShardsRequest.ts b/specification/_global/search_shards/SearchShardsRequest.ts index da8bbcaead..4094b20390 100644 --- a/specification/_global/search_shards/SearchShardsRequest.ts +++ b/specification/_global/search_shards/SearchShardsRequest.ts @@ -26,14 +26,45 @@ import { ExpandWildcards, Indices, Routing } from '@_types/common' */ export interface Request extends RequestBase { path_parts: { + /** + * Returns the indices and shards that a search request would be executed against. + */ index?: Indices } query_parameters: { + /** + * If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. + * This behavior applies even if the request targets other open indices. + * For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. + * @server_default false + */ allow_no_indices?: boolean + /** + * Type of index that wildcard patterns can match. + * If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + * Supports comma-separated values, such as `open,hidden`. + * Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + * @server_default open + */ expand_wildcards?: ExpandWildcards + /** + * If `false`, the request returns an error if it targets a missing or closed index. + * @server_default false + */ ignore_unavailable?: boolean + /** + * If `true`, the request retrieves information from the local node only. + * @server_default false + */ local?: boolean + /** + * Specifies the node or shard the operation should be performed on. + * Random by default. + */ preference?: string + /** + * Custom value used to route operations to a specific shard. + */ routing?: Routing } } diff --git a/specification/_global/search_template/SearchTemplateRequest.ts b/specification/_global/search_template/SearchTemplateRequest.ts index f5292d67d5..4d040db71f 100644 --- a/specification/_global/search_template/SearchTemplateRequest.ts +++ b/specification/_global/search_template/SearchTemplateRequest.ts @@ -30,6 +30,7 @@ import { import { Duration } from '@_types/Time' /** + * Runs a search with a search template. * @rest_spec_name search_template * @availability stack since=2.0.0 stability=stable * @availability serverless stability=stable visibility=public @@ -43,19 +44,44 @@ export interface Request extends RequestBase { index?: Indices } query_parameters: { - /** @server_default true */ + /** + * If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. + * This behavior applies even if the request targets other open indices. + * For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. + * @server_default true + */ allow_no_indices?: boolean - /** @server_default false */ + /** + * If `true`, network round-trips are minimized for cross-cluster search requests. + * @server_default false */ ccs_minimize_roundtrips?: boolean + /** + * Type of index that wildcard patterns can match. + * If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + * Supports comma-separated values, such as `open,hidden`. + * Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + */ expand_wildcards?: ExpandWildcards - /** @server_default false */ + /** + * If `true`, the response includes additional details about score computation as part of a hit. + * @server_default false */ explain?: boolean - /** @server_default true */ + /** + * If `true`, specified concrete, expanded, or aliased indices are not included in the response when throttled. + * @server_default true */ ignore_throttled?: boolean - /** @server_default false */ + /** + * If `false`, the request returns an error if it targets a missing or closed index. + * @server_default false */ ignore_unavailable?: boolean + /** + * Specifies the node or shard the operation should be performed on. + * Random by default. + */ preference?: string - /** @server_default false */ + /** + * If `true`, the query execution is profiled. + * @server_default false */ profile?: boolean /** Custom value used to route operations to a specific shard. */ routing?: Routing @@ -73,19 +99,30 @@ export interface Request extends RequestBase { * @availability serverless */ rest_total_hits_as_int?: boolean - /** @server_default false */ + /** + * If `true`, the response prefixes aggregation and suggester names with their respective types. + * @server_default false */ typed_keys?: boolean } body: { - /** @server_default false */ + /** + * If `true`, returns detailed information about score calculation as part of each hit. + * @server_default false */ explain?: boolean /** * ID of the search template to use. If no source is specified, * this parameter is required. */ id?: Id + /** + * Key-value pairs used to replace Mustache variables in the template. + * The key is the variable name. + * The value is the variable value. + */ params?: Dictionary - /** @server_default false */ + /** + * If `true`, the query execution is profiled. + * @server_default false */ profile?: boolean /** * An inline search template. Supports the same parameters as the search API's From f16d22a4e5e7786419e984239713298b06183ba9 Mon Sep 17 00:00:00 2001 From: Elastic Machine Date: Thu, 7 Sep 2023 15:48:59 +0000 Subject: [PATCH 7/7] Update specification output --- output/schema/schema.json | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index 47c9d9501a..e4ba020c04 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -21570,7 +21570,7 @@ } }, { - "description": "If true, the request is real-time as opposed to near-real-time.", + "description": "If `true`, the request is real-time as opposed to near-real-time.", "docId": "realtime", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/docs-get.html#realtime", "name": "realtime", @@ -21612,7 +21612,7 @@ } }, { - "description": "True or false to return the _source field or not, or a list of fields to return.", + "description": "`true` or `false` to return the `_source` field or not, or a list of fields to return.", "name": "_source", "required": false, "type": { @@ -21704,7 +21704,7 @@ "body": { "kind": "no_body" }, - "description": "Checks if a document is stored in the `source`.", + "description": "Checks if a document's `_source` is stored.", "inherits": { "type": { "name": "RequestBase", @@ -21798,7 +21798,7 @@ } }, { - "description": "True or false to return the _source field or not, or a list of fields to return.", + "description": "`true` or `false` to return the `_source` field or not, or a list of fields to return.", "name": "_source", "required": false, "type": { @@ -22895,7 +22895,7 @@ } }, { - "description": "If true, the request is real-time as opposed to near-real-time.", + "description": "If `true`, the request is real-time as opposed to near-real-time.", "docId": "realtime", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/docs-get.html#realtime", "name": "realtime", @@ -27058,7 +27058,7 @@ } }, { - "description": "If `true`, the response returns hits.total as an integer.\nIf `false`, it returns hits.total as an object.", + "description": "If `true`, the response returns `hits.total` as an integer.\nIf `false`, it returns `hits.total` as an object.", "name": "rest_total_hits_as_int", "required": false, "serverDefault": false, @@ -29608,7 +29608,6 @@ } }, { - "description": "", "name": "throttled", "required": false, "type": { @@ -29709,7 +29708,7 @@ } } ], - "specLocation": "_global/reindex_rethrottle/types.ts#L37-L88" + "specLocation": "_global/reindex_rethrottle/types.ts#L37-L85" }, { "kind": "interface", @@ -29847,7 +29846,7 @@ } } ], - "specLocation": "_global/reindex_rethrottle/types.ts#L90-L101" + "specLocation": "_global/reindex_rethrottle/types.ts#L87-L98" }, { "attachedBehaviors": [