mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-15 09:25:40 +00:00
* `ignore_unavailable` - Controls whether to ignore if any specified indices are unavailable, this includes indices that don't exist or closed indices. Either `true` or `false` can be specified. * `allow_no_indices` - Controls whether to fail if a wildcard indices expressions results into no concrete indices. Either `true` or `false` can be specified. For example if the wildcard expression `foo*` is specified and no indices are available that start with `foo` then depending on this setting the request will fail. This setting is also applicable when `_all`, `*` or no index has been specified. * `expand_wildcards` - Controls to what kind of concrete indices wildcard indices expression expand to. If `open` is specified then the wildcard expression if expanded to only open indices and if `closed` is specified then the wildcard expression if expanded only to closed indices. Also both values (`open,closed`) can be specified to expand to all indices. Closes to #4436
29 lines
1.1 KiB
Plaintext
29 lines
1.1 KiB
Plaintext
[[indices-open-close]]
|
|
== Open / Close Index API
|
|
|
|
The open and close index APIs allow to close an index, and later on
|
|
opening it. A closed index has almost no overhead on the cluster (except
|
|
for maintaining its metadata), and is blocked for read/write operations.
|
|
A closed index can be opened which will then go through the normal
|
|
recovery process.
|
|
|
|
The REST endpoint is `/{index}/_close` and `/{index}/_open`. For
|
|
example:
|
|
|
|
[source,js]
|
|
--------------------------------------------------
|
|
curl -XPOST 'localhost:9200/my_index/_close'
|
|
|
|
curl -XPOST 'localhost:9200/my_index/_open'
|
|
--------------------------------------------------
|
|
|
|
It is possible to open and close multiple indices. An error will be thrown
|
|
if the request explicitly refers to a missing index. This behaviour can be
|
|
disabled using the `ignore_unavailable=true` parameter.
|
|
|
|
All indices can be opened or closed at once using `_all` as the index name
|
|
or specifying patterns that identify them all (e.g. `*`).
|
|
Closing all indices can be disabled by setting the `action.disable_close_all_indices`
|
|
flag in the config file to `true`.
|
|
|