freeze.asciidoc 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. [float]
  10. === Request
  11. `POST /<index>/_freeze`
  12. [float]
  13. === Description
  14. A frozen index has almost no overhead on the cluster (except
  15. for maintaining its metadata in memory), and is blocked for write operations.
  16. See <<frozen-indices>> and <<unfreeze-index-api>>.
  17. [float]
  18. === Path Parameters
  19. `index` (required)::
  20. (string) Identifier for the index
  21. //=== Query Parameters
  22. //=== Authorization
  23. [float]
  24. === Examples
  25. The following example freezes and unfreezes an index:
  26. [source,js]
  27. --------------------------------------------------
  28. POST /my_index/_freeze
  29. POST /my_index/_unfreeze
  30. --------------------------------------------------
  31. // CONSOLE
  32. // TEST[s/^/PUT my_index\n/]
  33. [IMPORTANT]
  34. ================================
  35. Freezing an index will close the index and reopen it within the same API call. This causes primaries to not be allocated for a short
  36. amount of time and causes the cluster to go red until the primaries are allocated again. This limitation might be removed in the future.
  37. ================================