Skip to content

Commit b4c5c33

Browse files
authored
Add max_docs query parameter to reindex API (#4842)
1 parent 47d6b76 commit b4c5c33

File tree

6 files changed

+44
-4
lines changed

6 files changed

+44
-4
lines changed

output/openapi/elasticsearch-openapi.json

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/openapi/elasticsearch-serverless-openapi.json

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema.json

Lines changed: 13 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/validation-errors.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@
3131
},
3232
"reindex": {
3333
"request": [
34-
"Request: query parameter 'require_alias' does not exist in the json spec",
35-
"Request: missing json spec query parameter 'max_docs'"
34+
"Request: query parameter 'require_alias' does not exist in the json spec"
3635
],
3736
"response": []
3837
},

output/typescript/types.ts

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_global/reindex/ReindexRequest.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
import { RequestBase } from '@_types/Base'
2121
import { Conflicts, Slices, WaitForActiveShards } from '@_types/common'
22-
import { float, long } from '@_types/Numeric'
22+
import { float, integer, long } from '@_types/Numeric'
2323
import { Script } from '@_types/Scripting'
2424
import { Duration } from '@_types/Time'
2525
import { Destination, Source } from './types'
@@ -114,6 +114,14 @@ export interface Request extends RequestBase {
114114
* @ext_doc_id slice-scroll
115115
*/
116116
slices?: Slices
117+
/**
118+
* The maximum number of documents to reindex.
119+
* By default, all documents are reindexed.
120+
* 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.
121+
*
122+
* 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.
123+
*/
124+
max_docs?: integer
117125
/**
118126
* The period each indexing waits for automatic index creation, dynamic mapping updates, and waiting for active shards.
119127
* By default, Elasticsearch waits for at least one minute before failing.

0 commit comments

Comments
 (0)