mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-06 13:08:29 +00:00
25aac4f77f
The "include_type_name" parameter was temporarily introduced in #37285 to facilitate moving the default parameter setting to "false" in many places in the documentation code snippets. Most of the places can simply be reverted without causing errors. In this change I looked for asciidoc files that contained the "include_type_name=true" addition when creating new indices but didn't look likey they made use of the "_doc" type for mappings. This is mostly the case e.g. in the analysis docs where index creating often only contains settings. I manually corrected the use of types in some places where the docs still used an explicit type name and not the dummy "_doc" type.
57 lines
1.3 KiB
Plaintext
57 lines
1.3 KiB
Plaintext
[[recovery-prioritization]]
|
|
=== Index recovery prioritization
|
|
|
|
Unallocated shards are recovered in order of priority, whenever possible.
|
|
Indices are sorted into priority order as follows:
|
|
|
|
* the optional `index.priority` setting (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:
|
|
|
|
[source,js]
|
|
------------------------------
|
|
PUT index_1
|
|
|
|
PUT index_2
|
|
|
|
PUT index_3
|
|
{
|
|
"settings": {
|
|
"index.priority": 10
|
|
}
|
|
}
|
|
|
|
PUT index_4
|
|
{
|
|
"settings": {
|
|
"index.priority": 5
|
|
}
|
|
}
|
|
------------------------------
|
|
// CONSOLE
|
|
|
|
In the above example:
|
|
|
|
* `index_3` will be recovered first because it has the highest `index.priority`.
|
|
* `index_4` will be recovered next because it has the next highest priority.
|
|
* `index_2` will be recovered next because it was created more recently.
|
|
* `index_1` will be recovered last.
|
|
|
|
This setting accepts an integer, and can be updated on a live index with the
|
|
<<indices-update-settings,update index settings API>>:
|
|
|
|
[source,js]
|
|
------------------------------
|
|
PUT index_4/_settings
|
|
{
|
|
"index.priority": 1
|
|
}
|
|
------------------------------
|
|
// CONSOLE
|
|
// TEST[continued]
|