diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 88f00f7017..71cce4cf6a 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -31248,6 +31248,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 80f26d7fb7..502a5a66ee 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -19351,6 +19351,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 782e2dff77..dca7e26041 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -36181,6 +36181,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", @@ -36234,7 +36246,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 b7074cf928..1612d45ccd 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -38,8 +38,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 6cda9f51e1..02024f3d5e 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -1000,6 +1000,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.