freeze.asciidoc 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. [role="xpack"]
  2. [testenv="basic"]
  3. [[freeze-index-api]]
  4. === Freeze index API
  5. ++++
  6. <titleabbrev>Freeze index</titleabbrev>
  7. ++++
  8. Freezes an index.
  9. [[freeze-index-api-request]]
  10. ==== {api-request-title}
  11. `POST /<index>/_freeze`
  12. //[[freeze-index-api-prereqs]]
  13. //==== {api-prereq-title}
  14. [[freeze-index-api-desc]]
  15. ==== {api-description-title}
  16. A frozen index has almost no overhead on the cluster (except for maintaining its
  17. metadata in memory) and is read-only. Read-only indices are blocked for write
  18. operations, such as <<indexing,docs-index_>> or <<indices-forcemerge,force
  19. merges>>. See <<frozen-indices>> and <<unfreeze-index-api>>.
  20. IMPORTANT: Freezing an index will close the index and reopen it within the same
  21. API call. This causes primaries to not be allocated for a short amount of time
  22. and causes the cluster to go red until the primaries are allocated again. This
  23. limitation might be removed in the future.
  24. [[freeze-index-api-path-parms]]
  25. ==== {api-path-parms-title}
  26. `<index>`::
  27. (Required, string) Identifier for the index.
  28. [[freeze-index-api-examples]]
  29. ==== {api-examples-title}
  30. The following example freezes and unfreezes an index:
  31. [source,console]
  32. --------------------------------------------------
  33. POST /my_index/_freeze
  34. POST /my_index/_unfreeze
  35. --------------------------------------------------
  36. // TEST[s/^/PUT my_index\n/]