diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 1681fe593e..cc223b38f2 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -30001,6 +30001,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 381acf9f50..604682383c 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -18536,6 +18536,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 fa7fa897d2..cc8b00f6da 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -35893,6 +35893,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", @@ -35946,7 +35958,7 @@ } } ], - "specLocation": "_global/reindex/ReindexRequest.ts#L27-L309" + "specLocation": "_global/reindex/ReindexRequest.ts#L27-L317" }, { "kind": "response", diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 722a491ce9..a44215f456 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -275,8 +275,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 60ceec6d79..d7b85ca5ba 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -1053,6 +1053,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 41ee90bb54..5ad2defbf1 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' @@ -253,6 +253,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.