diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 22c6a6bceb..fb80efe37b 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -33988,6 +33988,16 @@ }, "style": "form" }, + { + "in": "query", + "name": "max_docs", + "description": "The maximum number of documents to reindex.\nBy default, all documents are reindexed.\nIf it is a value less then or equal to `scroll_size`, a scroll will not be used to retrieve the results for the operation.\n\nIf `conflicts` is set to `proceed`, the reindex operation could attempt to reindex more documents from the source than `max_docs` until it has successfully indexed `max_docs` documents into the target or it has gone through every document in the source query.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, { "in": "query", "name": "timeout", diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 28fdd04318..018c7d533a 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -20951,6 +20951,16 @@ }, "style": "form" }, + { + "in": "query", + "name": "max_docs", + "description": "The maximum number of documents to reindex.\nBy default, all documents are reindexed.\nIf it is a value less then or equal to `scroll_size`, a scroll will not be used to retrieve the results for the operation.\n\nIf `conflicts` is set to `proceed`, the reindex operation could attempt to reindex more documents from the source than `max_docs` until it has successfully indexed `max_docs` documents into the target or it has gone through every document in the source query.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, { "in": "query", "name": "timeout", diff --git a/output/schema/schema.json b/output/schema/schema.json index 2f1f55a188..c587346ed6 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -35769,6 +35769,18 @@ } } }, + { + "description": "The maximum number of documents to reindex.\nBy default, all documents are reindexed.\nIf it is a value less then or equal to `scroll_size`, a scroll will not be used to retrieve the results for the operation.\n\nIf `conflicts` is set to `proceed`, the reindex operation could attempt to reindex more documents from the source than `max_docs` until it has successfully indexed `max_docs` documents into the target or it has gone through every document in the source query.", + "name": "max_docs", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, { "description": "The period each indexing waits for automatic index creation, dynamic mapping updates, and waiting for active shards.\nBy default, Elasticsearch waits for at least one minute before failing.\nThe actual wait time could be longer, particularly when multiple waits occur.", "name": "timeout", @@ -35822,7 +35834,7 @@ } } ], - "specLocation": "_global/reindex/ReindexRequest.ts#L27-L170" + "specLocation": "_global/reindex/ReindexRequest.ts#L27-L178" }, { "kind": "response", diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 48157f2b6d..1472783810 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -37,8 +37,7 @@ }, "reindex": { "request": [ - "Request: query parameter 'require_alias' does not exist in the json spec", - "Request: missing json spec query parameter 'max_docs'" + "Request: query parameter 'require_alias' does not exist in the json spec" ], "response": [] }, diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 2f76642000..3b835d74f0 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -999,6 +999,7 @@ export interface ReindexRequest extends RequestBase { requests_per_second?: float scroll?: Duration slices?: Slices + max_docs?: integer timeout?: Duration wait_for_active_shards?: WaitForActiveShards wait_for_completion?: boolean diff --git a/specification/_global/reindex/ReindexRequest.ts b/specification/_global/reindex/ReindexRequest.ts index af7c37ea7c..228e152168 100644 --- a/specification/_global/reindex/ReindexRequest.ts +++ b/specification/_global/reindex/ReindexRequest.ts @@ -19,7 +19,7 @@ import { RequestBase } from '@_types/Base' import { Conflicts, Slices, WaitForActiveShards } from '@_types/common' -import { float, long } from '@_types/Numeric' +import { float, integer, long } from '@_types/Numeric' import { Script } from '@_types/Scripting' import { Duration } from '@_types/Time' import { Destination, Source } from './types' @@ -114,6 +114,14 @@ export interface Request extends RequestBase { * @ext_doc_id slice-scroll */ slices?: Slices + /** + * The maximum number of documents to reindex. + * By default, all documents are reindexed. + * If it is a value less then or equal to `scroll_size`, a scroll will not be used to retrieve the results for the operation. + * + * If `conflicts` is set to `proceed`, the reindex operation could attempt to reindex more documents from the source than `max_docs` until it has successfully indexed `max_docs` documents into the target or it has gone through every document in the source query. + */ + max_docs?: integer /** * The period each indexing waits for automatic index creation, dynamic mapping updates, and waiting for active shards. * By default, Elasticsearch waits for at least one minute before failing.