- Elasticsearch 7.0 Cookbook(Fourth Edition)
- Alberto Paro
- 164字
- 2021-06-24 14:52:17
How it works...
When an index is closed, there is no overhead on the cluster (except for metadata state): the index shards are switched off and they don't use file descriptors, memory, or threads.
There are many use cases when closing an index:
- It can disable date-based indices (indices that store their records by date)–for example, when you keep an index for a week, month, or day and you want to keep a fixed number of old indices (that is, 2 months old) online and some offline (that is, from 2 months to 6 months old).
- When you do searches on all the active indices of a cluster and don't want to search in some indices (in this case, using an alias is the best solution, but you can achieve the same concept with an alias with closed indices).
An alias cannot have the same name as an index.
When an index is closed, calling open restores its state.
When an index is closed, calling open restores its state.