2018-11-20 02:03:24 -05:00
|
|
|
[role="xpack"]
|
|
|
|
[testenv="basic"]
|
|
|
|
[[freeze-index-api]]
|
2019-07-08 11:56:30 -04:00
|
|
|
=== Freeze index API
|
2018-11-20 02:03:24 -05:00
|
|
|
++++
|
2018-12-20 13:23:28 -05:00
|
|
|
<titleabbrev>Freeze index</titleabbrev>
|
2018-11-20 02:03:24 -05:00
|
|
|
++++
|
|
|
|
|
|
|
|
Freezes an index.
|
|
|
|
|
2019-07-08 11:56:30 -04:00
|
|
|
[[freeze-index-api-request]]
|
|
|
|
==== {api-request-title}
|
2018-11-20 02:03:24 -05:00
|
|
|
|
|
|
|
`POST /<index>/_freeze`
|
|
|
|
|
2019-07-08 11:56:30 -04:00
|
|
|
//[[freeze-index-api-prereqs]]
|
|
|
|
//==== {api-prereq-title}
|
|
|
|
|
|
|
|
[[freeze-index-api-desc]]
|
|
|
|
==== {api-description-title}
|
2018-11-20 02:03:24 -05:00
|
|
|
|
|
|
|
A frozen index has almost no overhead on the cluster (except
|
|
|
|
for maintaining its metadata in memory), and is blocked for write operations.
|
|
|
|
See <<frozen-indices>> and <<unfreeze-index-api>>.
|
|
|
|
|
2019-07-08 11:56:30 -04:00
|
|
|
IMPORTANT: 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 amount of time
|
|
|
|
and causes the cluster to go red until the primaries are allocated again. This
|
|
|
|
limitation might be removed in the future.
|
2018-11-20 02:03:24 -05:00
|
|
|
|
2019-07-08 11:56:30 -04:00
|
|
|
[[freeze-index-api-path-parms]]
|
|
|
|
==== {api-path-parms-title}
|
2018-11-20 02:03:24 -05:00
|
|
|
|
2019-07-12 11:26:31 -04:00
|
|
|
`<index>`::
|
|
|
|
(Required, string) Identifier for the index.
|
2018-11-20 02:03:24 -05:00
|
|
|
|
2019-07-08 11:56:30 -04:00
|
|
|
[[freeze-index-api-examples]]
|
|
|
|
==== {api-examples-title}
|
2018-11-20 02:03:24 -05:00
|
|
|
|
|
|
|
The following example freezes and unfreezes an index:
|
|
|
|
|
2019-09-06 11:31:13 -04:00
|
|
|
[source,console]
|
2018-11-20 02:03:24 -05:00
|
|
|
--------------------------------------------------
|
|
|
|
POST /my_index/_freeze
|
|
|
|
POST /my_index/_unfreeze
|
|
|
|
--------------------------------------------------
|
|
|
|
// TEST[s/^/PUT my_index\n/]
|
|
|
|
|