Skip to content
This repository was archived by the owner on Sep 21, 2021. It is now read-only.

Commit 4f42598

Browse files
Added snippets for 020_Distributed_Cluster
1 parent 00babae commit 4f42598

File tree

6 files changed

+43
-5
lines changed

6 files changed

+43
-5
lines changed

020_Distributed_Cluster/10_Cluster_health.asciidoc

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ but the single most important one is the _cluster health_, which reports a
99
--------------------------------------------------
1010
GET /_cluster/health
1111
--------------------------------------------------
12+
// SENSE: 020_Distributed_Cluster/10_Cluster_health.json
1213

1314
which, on an empty cluster with no indices, will return something like:
1415

020_Distributed_Cluster/15_Add_an_index.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ PUT /blogs
5151
}
5252
}
5353
--------------------------------------------------
54-
54+
// SENSE: 020_Distributed_Cluster/15_Add_index.json
5555

5656
[[cluster-one-node]]
5757
.A single-node cluster with an index

020_Distributed_Cluster/30_Scale_more.asciidoc

+2-4
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@ of replicas from the default of `1` to `2`:
1717
--------------------------------------------------
1818
PUT /blogs/_settings
1919
{
20-
"index" : {
21-
"number_of_replicas" : 2
22-
}
20+
"number_of_replicas" : 2
2321
}
2422
--------------------------------------------------
25-
23+
// SENSE: 020_Distributed_Cluster/30_Replicas.json
2624

2725
[[cluster-three-nodes-two-replicas]]
2826
.Increasing the `number_of_replicas` to 2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Delete ALL DATA IN THE CLUSTER!
2+
DELETE /_all
3+
4+
# Retrieve the cluster health
5+
GET /_cluster/health
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Delete ALL DATA IN THE CLUSTER!
2+
DELETE /_all
3+
4+
# Create an index with 3 primary shards with 1 replica each
5+
PUT /blogs
6+
{
7+
"settings" : {
8+
"number_of_shards" : 3,
9+
"number_of_replicas" : 1
10+
}
11+
}
12+
13+
# Retrieve the cluster health
14+
GET /_cluster/health
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Delete ALL DATA IN THE CLUSTER!
2+
DELETE /_all
3+
4+
# Create an index with 3 primary shards with 1 replica each
5+
PUT /blogs
6+
{
7+
"settings" : {
8+
"number_of_shards" : 3,
9+
"number_of_replicas" : 1
10+
}
11+
}
12+
13+
# Increae number of replicas to 2
14+
PUT /blogs/_settings
15+
{
16+
"number_of_replicas" : 2
17+
}
18+
19+
# Retrieve the cluster health
20+
GET /_cluster/health

0 commit comments

Comments
 (0)