Skip to content

Commit 7f8f975

Browse files
authored
Add max_docs query parameter to reindex API (#4842) (#4867)
(cherry picked from commit b4c5c33) # Conflicts: # output/schema/schema.json
1 parent 5d97e92 commit 7f8f975

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
@@ -275,8 +275,7 @@
275275
},
276276
"reindex": {
277277
"request": [
278-
"Request: query parameter 'require_alias' does not exist in the json spec",
279-
"Request: missing json spec query parameter 'max_docs'"
278+
"Request: query parameter 'require_alias' does not exist in the json spec"
280279
],
281280
"response": []
282281
},

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'
@@ -253,6 +253,14 @@ export interface Request extends RequestBase {
253253
* @ext_doc_id slice-scroll
254254
*/
255255
slices?: Slices
256+
/**
257+
* The maximum number of documents to reindex.
258+
* By default, all documents are reindexed.
259+
* 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.
260+
*
261+
* 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.
262+
*/
263+
max_docs?: integer
256264
/**
257265
* The period each indexing waits for automatic index creation, dynamic mapping updates, and waiting for active shards.
258266
* By default, Elasticsearch waits for at least one minute before failing.

0 commit comments

Comments
 (0)