freeze.asciidoc 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. The current write index on a data stream cannot be frozen. In order to freeze
  21. the current write index, the data stream must first be
  22. <<rollover-data-stream-ex,rolled over>> so that a new write index is created
  23. and then the previous write index can be frozen.
  24. IMPORTANT: Freezing an index will close the index and reopen it within the same
  25. API call. This causes primaries to not be allocated for a short amount of time
  26. and causes the cluster to go red until the primaries are allocated again. This
  27. limitation might be removed in the future.
  28. [[freeze-index-api-path-parms]]
  29. ==== {api-path-parms-title}
  30. `<index>`::
  31. (Required, string) Identifier for the index.
  32. [[freeze-index-api-examples]]
  33. ==== {api-examples-title}
  34. The following example freezes and unfreezes an index:
  35. [source,console]
  36. --------------------------------------------------
  37. POST /my-index-000001/_freeze
  38. POST /my-index-000001/_unfreeze
  39. --------------------------------------------------
  40. // TEST[s/^/PUT my-index-000001\n/]