原英文版地址: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/recovery-prioritization.html, 原文档版权归 www.elastic.co 所有
本地英文版地址: ../en/recovery-prioritization.html
本地英文版地址: ../en/recovery-prioritization.html
重要: 此版本不会发布额外的bug修复或文档更新。最新信息请参考 当前版本文档。
Index recovery prioritizationedit
Unallocated shards are recovered in order of priority, whenever possible. Indices are sorted into priority order as follows:
-
the optional
index.prioritysetting (higher before lower) - the index creation date (higher before lower)
- the index name (higher before lower)
This means that, by default, newer indices will be recovered before older indices.
Use the per-index dynamically updatable index.priority setting to customise
the index prioritization order. For instance:
PUT index_1
PUT index_2
PUT index_3
{
"settings": {
"index.priority": 10
}
}
PUT index_4
{
"settings": {
"index.priority": 5
}
}
In the above example:
-
index_3will be recovered first because it has the highestindex.priority. -
index_4will be recovered next because it has the next highest priority. -
index_2will be recovered next because it was created more recently. -
index_1will be recovered last.
This setting accepts an integer, and can be updated on a live index with the update index settings API:
PUT index_4/_settings
{
"index.priority": 1
}