prioritization.asciidoc 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. [[recovery-prioritization]]
  2. === Index recovery prioritization
  3. Unallocated shards are recovered in order of priority, whenever possible.
  4. Indices are sorted into priority order as follows:
  5. * the optional `index.priority` setting (higher before lower)
  6. * the index creation date (higher before lower)
  7. * the index name (higher before lower)
  8. This means that, by default, newer indices will be recovered before older indices.
  9. Use the per-index dynamically updateable `index.priority` setting to customise
  10. the index prioritization order. For instance:
  11. [source,js]
  12. ------------------------------
  13. PUT index_1
  14. PUT index_2
  15. PUT index_3
  16. {
  17. "settings": {
  18. "index.priority": 10
  19. }
  20. }
  21. PUT index_4
  22. {
  23. "settings": {
  24. "index.priority": 5
  25. }
  26. }
  27. ------------------------------
  28. // CONSOLE
  29. In the above example:
  30. * `index_3` will be recovered first because it has the highest `index.priority`.
  31. * `index_4` will be recovered next because it has the next highest priority.
  32. * `index_2` will be recovered next because it was created more recently.
  33. * `index_1` will be recovered last.
  34. This setting accepts an integer, and can be updated on a live index with the
  35. <<indices-update-settings,update index settings API>>:
  36. [source,js]
  37. ------------------------------
  38. PUT index_4/_settings
  39. {
  40. "index.priority": 1
  41. }
  42. ------------------------------
  43. // CONSOLE
  44. // TEST[continued]