freeze.asciidoc 1.2 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
  17. for maintaining its metadata in memory), and is blocked for write operations.
  18. See <<frozen-indices>> and <<unfreeze-index-api>>.
  19. IMPORTANT: Freezing an index will close the index and reopen it within the same
  20. API call. This causes primaries to not be allocated for a short amount of time
  21. and causes the cluster to go red until the primaries are allocated again. This
  22. limitation might be removed in the future.
  23. [[freeze-index-api-path-parms]]
  24. ==== {api-path-parms-title}
  25. `<index>` (Required)::
  26. (string) Identifier for the index.
  27. [[freeze-index-api-examples]]
  28. ==== {api-examples-title}
  29. The following example freezes and unfreezes an index:
  30. [source,js]
  31. --------------------------------------------------
  32. POST /my_index/_freeze
  33. POST /my_index/_unfreeze
  34. --------------------------------------------------
  35. // CONSOLE
  36. // TEST[s/^/PUT my_index\n/]