You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Add RestRemoveIndexBlockAction for DELETE /{index}/_block/{block}
- Add indices.remove_block.json API specification
- Update YAML REST tests and documentation
- Remove shards_acknowledged field references from docs
Completes public HTTP interface providing symmetry with addBlock API.
Copy file name to clipboardExpand all lines: docs/reference/elasticsearch/index-settings/index-block.md
+103Lines changed: 103 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -143,3 +143,106 @@ The API returns following response:
143
143
}
144
144
```
145
145
146
+
147
+
## Remove index block API [remove-index-block]
148
+
149
+
Removes an index block from an index. Unlike the add index block API, this operation doesn't require shard-level verification and completes immediately after updating the cluster metadata.
: (Optional, string) Comma-separated list or wildcard expression of index names used to limit the request.
165
+
166
+
By default, you must explicitly name the indices you are removing blocks from. To allow the removal of blocks from indices with `_all`, `*`, or other wildcard expressions, change the `action.destructive_requires_name` setting to `false`. You can update this setting in the `elasticsearch.yml` file or using the [cluster update settings](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-settings) API.
167
+
168
+
169
+
`<block>`
170
+
: (Required, string) Block type to remove from the index.
: (Optional, Boolean) If `false`, the request returns an error if any wildcard expression, [index alias](docs-content://manage-data/data-store/aliases.md), or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.
194
+
195
+
Defaults to `true`.
196
+
197
+
198
+
`expand_wildcards`
199
+
: (Optional, string) Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are:
200
+
201
+
`all`
202
+
: Match any data stream or index, including [hidden](/reference/elasticsearch/rest-apis/api-conventions.md#multi-hidden) ones.
203
+
204
+
`open`
205
+
: Match open, non-hidden indices. Also matches any non-hidden data stream.
206
+
207
+
`closed`
208
+
: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
209
+
210
+
`hidden`
211
+
: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or both.
212
+
213
+
`none`
214
+
: Wildcard patterns are not accepted.
215
+
216
+
Defaults to `open`.
217
+
218
+
219
+
`ignore_unavailable`
220
+
: (Optional, Boolean) If `false`, the request returns an error if it targets a missing or closed index. Defaults to `false`.
221
+
222
+
`master_timeout`
223
+
: (Optional, [time units](/reference/elasticsearch/rest-apis/api-conventions.md#time-units)) Period to wait for the master node. If the master node is not available before the timeout expires, the request fails and returns an error. Defaults to `30s`. Can also be set to `-1` to indicate that the request should never timeout.
224
+
225
+
`timeout`
226
+
: (Optional, [time units](/reference/elasticsearch/rest-apis/api-conventions.md#time-units)) Period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata. If no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged. Defaults to `30s`. Can also be set to `-1` to indicate that the request should never timeout.
"description": "A comma separated list of indices to remove a block from"
25
+
},
26
+
"block": {
27
+
"type": "string",
28
+
"description": "The block to remove (one of read, write, read_only or metadata)"
29
+
}
30
+
}
31
+
}
32
+
]
33
+
},
34
+
"params": {
35
+
"timeout": {
36
+
"type": "time",
37
+
"description": "Explicit operation timeout"
38
+
},
39
+
"master_timeout": {
40
+
"type": "time",
41
+
"description": "Specify timeout for connection to master"
42
+
},
43
+
"ignore_unavailable": {
44
+
"type": "boolean",
45
+
"description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
46
+
},
47
+
"allow_no_indices": {
48
+
"type": "boolean",
49
+
"description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
50
+
},
51
+
"expand_wildcards": {
52
+
"type": "enum",
53
+
"options": [
54
+
"open",
55
+
"closed",
56
+
"hidden",
57
+
"none",
58
+
"all"
59
+
],
60
+
"default": "open",
61
+
"description": "Whether to expand wildcard expression to concrete indices that are open, closed or both."
0 commit comments