Skip to content

Add max_docs query parameter to reindex API #4842

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions output/openapi/elasticsearch-openapi.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions output/openapi/elasticsearch-serverless-openapi.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 13 additions & 1 deletion output/schema/schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions output/schema/validation-errors.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": []
},
Expand Down
1 change: 1 addition & 0 deletions output/typescript/types.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion specification/_global/reindex/ReindexRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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.
Expand Down
Loading