Skip to content

Commit

Permalink
Docs adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
jasontedor committed May 14, 2018
1 parent 21f87f2 commit 4852f34
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/reference/cluster/health.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

The cluster health API allows to get a very simple status on the health
of the cluster. For example, on a quiet single node cluster with a single index
with 5 shards and one replica, this:
with one shard and one replica, this:

[source,js]
--------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/getting-started.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Replication is important for two primary reasons:
To summarize, each index can be split into multiple shards. An index can also be replicated zero (meaning no replicas) or more times. Once replicated, each index will have primary shards (the original shards that were replicated from) and replica shards (the copies of the primary shards).
The number of shards and replicas can be defined per index at the time the index is created. After the index is created, you may change the number of replicas dynamically anytime but you cannot change the number of shards after-the-fact.

By default, each index in Elasticsearch is allocated 5 primary shards and 1 replica which means that if you have at least two nodes in your cluster, your index will have 5 primary shards and another 5 replica shards (1 complete replica) for a total of 10 shards per index.
By default, each index in Elasticsearch is allocated one primary shard and one replica which means that if you have at least two nodes in your cluster, your index will have one primary shard and another replica shard (one complete replica) for a total of two shards per index.

NOTE: Each Elasticsearch shard is a Lucene index. There is a maximum number of documents you can have in a single Lucene index. As of https://issues.apache.org/jira/browse/LUCENE-5843[`LUCENE-5843`], the limit is `2,147,483,519` (= Integer.MAX_VALUE - 128) documents.
You can monitor shard sizes using the {ref}/cat-shards.html[`_cat/shards`] API.
Expand Down Expand Up @@ -370,7 +370,7 @@ yellow open customer 95SQ4TSUT7mWBT7VNHH67A 1 1 0 0
--------------------------------------------------
// TESTRESPONSE[s/95SQ4TSUT7mWBT7VNHH67A/.+/ s/260b/\\d+\\.?\\d?k?b/ _cat]

The results of the second command tells us that we now have 1 index named customer and it has 5 primary shards and 1 replica (the defaults) and it contains 0 documents in it.
The results of the second command tells us that we now have one index named customer and it has one primary shard and one replica (the defaults) and it contains zero documents in it.

You might also notice that the customer index has a yellow health tagged to it. Recall from our previous discussion that yellow means that some replicas are not (yet) allocated. The reason this happens for this index is because Elasticsearch by default created one replica for this index. Since we only have one node running at the moment, that one replica cannot yet be allocated (for high availability) until a later point in time when another node joins the cluster. Once that replica gets allocated onto a second node, the health status for this index will turn to green.

Expand Down
11 changes: 6 additions & 5 deletions docs/reference/glossary.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,13 @@
you index a document, it is indexed first on the primary shard, then
on all <<glossary-replica-shard,replicas>> of the primary shard.
+
By default, an <<glossary-index,index>> has 5 primary shards. You can
specify fewer or more primary shards to scale the number of
<<glossary-document,documents>> that your index can handle.
By default, an <<glossary-index,index>> has one primary shard. You can specify
more primary shards to scale the number of <<glossary-document,documents>>
that your index can handle.
+
You cannot change the number of primary shards in an index, once the
index is created.
You cannot change the number of primary shards in an index, once the index is
index is created. However, an index can be split into a new index using the
<<indices-split-index, split API>>.
+
See also <<glossary-routing,routing>>

Expand Down

0 comments on commit 4852f34

Please sign in to comment.