2018-11-20 02:03:24 -05:00
|
|
|
[role="xpack"]
|
|
|
|
[testenv="basic"]
|
|
|
|
[[freeze-index-api]]
|
2018-12-20 13:23:28 -05: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.
|
|
|
|
|
|
|
|
[float]
|
|
|
|
=== Request
|
|
|
|
|
|
|
|
`POST /<index>/_freeze`
|
|
|
|
|
|
|
|
[float]
|
|
|
|
=== Description
|
|
|
|
|
|
|
|
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>>.
|
|
|
|
|
|
|
|
[float]
|
|
|
|
=== Path Parameters
|
|
|
|
|
|
|
|
`index` (required)::
|
|
|
|
(string) Identifier for the index
|
|
|
|
|
|
|
|
//=== Query Parameters
|
|
|
|
|
|
|
|
//=== Authorization
|
|
|
|
|
|
|
|
[float]
|
|
|
|
=== Examples
|
|
|
|
|
|
|
|
The following example freezes and unfreezes an index:
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
|
|
|
POST /my_index/_freeze
|
|
|
|
POST /my_index/_unfreeze
|
|
|
|
--------------------------------------------------
|
|
|
|
// CONSOLE
|
|
|
|
// TEST[s/^/PUT my_index\n/]
|
|
|
|
|
|
|
|
[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.
|
|
|
|
================================
|