Skip to content

Commit f787c3b

Browse files
authored
[DOCS] Reformat freeze unfreeze APis to use new API format (#43948)
1 parent be1baef commit f787c3b

File tree

4 files changed

+49
-43
lines changed

4 files changed

+49
-43
lines changed
Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,41 @@
11
[role="xpack"]
22
[testenv="basic"]
33
[[freeze-index-api]]
4-
== Freeze index API
4+
=== Freeze index API
55
++++
66
<titleabbrev>Freeze index</titleabbrev>
77
++++
88

99
Freezes an index.
1010

11-
[float]
12-
=== Request
11+
[[freeze-index-api-request]]
12+
==== {api-request-title}
1313

1414
`POST /<index>/_freeze`
1515

16-
[float]
17-
=== Description
16+
//[[freeze-index-api-prereqs]]
17+
//==== {api-prereq-title}
18+
19+
[[freeze-index-api-desc]]
20+
==== {api-description-title}
1821

1922
A frozen index has almost no overhead on the cluster (except
2023
for maintaining its metadata in memory), and is blocked for write operations.
2124
See <<frozen-indices>> and <<unfreeze-index-api>>.
2225

23-
[float]
24-
=== Path Parameters
25-
26-
`index` (required)::
27-
(string) Identifier for the index
26+
IMPORTANT: Freezing an index will close the index and reopen it within the same
27+
API call. This causes primaries to not be allocated for a short amount of time
28+
and causes the cluster to go red until the primaries are allocated again. This
29+
limitation might be removed in the future.
2830

29-
//=== Query Parameters
31+
[[freeze-index-api-path-parms]]
32+
==== {api-path-parms-title}
3033

31-
//=== Authorization
34+
`<index>` (Required)::
35+
(string) Identifier for the index.
3236

33-
[float]
34-
=== Examples
37+
[[freeze-index-api-examples]]
38+
==== {api-examples-title}
3539

3640
The following example freezes and unfreezes an index:
3741

@@ -43,8 +47,3 @@ POST /my_index/_unfreeze
4347
// CONSOLE
4448
// TEST[s/^/PUT my_index\n/]
4549

46-
[IMPORTANT]
47-
================================
48-
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
49-
amount of time and causes the cluster to go red until the primaries are allocated again. This limitation might be removed in the future.
50-
================================
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[[index-apis]]
2+
== Index APIs
3+
4+
The index APIs are used to manage individual indices.
5+
6+
* <<freeze-index-api>>, <<unfreeze-index-api>>
7+
8+
See also <<indices>>.
9+
10+
include::freeze.asciidoc[]
11+
include::unfreeze.asciidoc[]
Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,40 @@
11
[role="xpack"]
22
[testenv="basic"]
33
[[unfreeze-index-api]]
4-
== Unfreeze index API
4+
=== Unfreeze index API
55
++++
66
<titleabbrev>Unfreeze index</titleabbrev>
77
++++
88

99
Unfreezes an index.
1010

11-
[float]
12-
=== Request
11+
[[unfreeze-index-api-request]]
12+
==== {api-request-title}
1313

1414
`POST /<index>/_unfreeze`
1515

16-
[float]
17-
=== Description
16+
//[[unfreeze-index-api-prereqs]]
17+
//==== {api-prereq-title}
18+
19+
[[unfreeze-index-api-desc]]
20+
==== {api-description-title}
1821

1922
When a frozen index is unfrozen, the index goes through the normal recovery
2023
process and becomes writeable again. See <<frozen-indices>> and <<freeze-index-api>>.
2124

22-
[float]
23-
=== Path Parameters
24-
25-
`index` (required)::
26-
(string) Identifier for the index
25+
IMPORTANT: Freezing an index will close the index and reopen it within the same
26+
API call. This causes primaries to not be allocated for a short amount of time
27+
and causes the cluster to go red until the primaries are allocated again. This
28+
limitation might be removed in the future.
2729

30+
[[unfreeze-index-api-path-parms]]
31+
==== {api-path-parms-title}
2832

29-
//=== Query Parameters
33+
`<index>` (Required)::
34+
(string) Identifier for the index.
3035

31-
//=== Authorization
32-
33-
[float]
34-
=== Examples
36+
[[unfreeze-index-api-examples]]
37+
==== {api-examples-title}
3538

3639
The following example freezes and unfreezes an index:
3740

@@ -42,9 +45,3 @@ POST /my_index/_unfreeze
4245
--------------------------------------------------
4346
// CONSOLE
4447
// TEST[s/^/PUT my_index\n/]
45-
46-
[IMPORTANT]
47-
================================
48-
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
49-
amount of time and causes the cluster to go red until the primaries are allocated again. This limitation might be removed in the future.
50-
================================

docs/reference/rest-api/index.asciidoc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ not be included yet.
1414
* <<ccr-apis,{ccr-cap} APIs>>
1515
* <<data-frame-apis,{dataframe-cap} APIs>>
1616
* <<graph-explore-api,Graph Explore API>>
17-
* <<freeze-index-api>>, <<unfreeze-index-api>>
17+
* <<index-apis>>
1818
* <<indices-reload-analyzers,Reload Search Analyzers API>>
1919
* <<index-lifecycle-management-api,Index lifecycle management APIs>>
2020
* <<licensing-apis,Licensing APIs>>
@@ -30,14 +30,13 @@ include::info.asciidoc[]
3030
include::{es-repo-dir}/ccr/apis/ccr-apis.asciidoc[]
3131
include::{es-repo-dir}/data-frames/apis/index.asciidoc[]
3232
include::{es-repo-dir}/graph/explore.asciidoc[]
33-
include::{es-repo-dir}/indices/apis/freeze.asciidoc[]
3433
include::{es-repo-dir}/ilm/apis/ilm-api.asciidoc[]
34+
include::{es-repo-dir}/indices/apis/index.asciidoc[]
3535
include::{es-repo-dir}/licensing/index.asciidoc[]
3636
include::{es-repo-dir}/migration/migration.asciidoc[]
3737
include::{es-repo-dir}/ml/apis/ml-api.asciidoc[]
3838
include::{es-repo-dir}/rollup/rollup-api.asciidoc[]
3939
include::{xes-repo-dir}/rest-api/security.asciidoc[]
40-
include::{es-repo-dir}/indices/apis/unfreeze.asciidoc[]
4140
include::{xes-repo-dir}/rest-api/watcher.asciidoc[]
4241
include::{es-repo-dir}/indices/apis/reload-analyzers.asciidoc[]
4342
include::defs.asciidoc[]

0 commit comments

Comments
 (0)