Skip to content

Commit f4bfd33

Browse files
committed
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 b8c43c4 commit f4bfd33

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
@@ -178,9 +178,9 @@
178178
"description": "The throttle for this request in sub-requests per second. -1 means no throttle."
179179
},
180180
"slices": {
181-
"type": "number",
181+
"type": "number|auto",
182182
"default": 1,
183-
"description": "The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks."
183+
"description": "The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks."
184184
}
185185
},
186186
"body":{

0 commit comments

Comments
 (0)