Skip to content

Commit c1d9966

Browse files
authored
Fix the "slices" parameter for the Delete By Query API in the REST specification (#51535)
This patch updates the `type` parameter in the Delete By Query API: according to [the documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html#docs-delete-by-query-slice), it can be set to "auto", but the type in the documentation allows only numerical values. This prevents people from setting the parameter to "auto" eg. in the Go client, which generates source from the specification, and sets the corresponding Go type as number. The patch uses the `|` notation, which we have discussed previously for encoding a "polymorphic" parameter like this. Related: elastic/go-elasticsearch#77
1 parent c8b6a84 commit c1d9966

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rest-api-spec/src/main/resources/rest-api-spec/api/delete_by_query.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,9 @@
173173
"description":"The throttle for this request in sub-requests per second. -1 means no throttle."
174174
},
175175
"slices":{
176-
"type":"number",
176+
"type":"number|auto",
177177
"default":1,
178-
"description":"The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks."
178+
"description":"The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks."
179179
}
180180
},
181181
"body":{

0 commit comments

Comments
 (0)