Connecting to Elasticsearch(ES) using the elasticsearch-head panel, version: 7.10.2, I found the following issues:
{ "name" : "DESKTOP-C76AMDM", "cluster_name" : "elasticsearch", "cluster_uuid" : "g5yrfnSXS6CVusCV5XUXMA", "version" : { "number" : "7.10.2", "build_flavor" : "default", "build_type" : "zip", "build_hash" : "747e1cc71def077253878a59143c1f785afa92b9", "build_date" : "2021-01-13T00:42:12.435326Z", "build_snapshot" : false, "lucene_version" : "8.7.0", "minimum_wire_compatibility_version" : "6.8.0", "minimum_index_compatibility_version" : "6.0.0-beta1" }, "tagline" : "You Know, for Search"
}
Viewudp-test-2021.01.27Index Settings:
The hyperlink login is visible.
You can also view it through Kibana, as shown below:
{ "udp-test-2021.01.27" : { "settings" : { "index" : { "routing" : { "allocation" : { "include" : { "_tier_preference" : "data_content" } } }, "number_of_shards" : "1", "provided_name" : "udp-test-2021.01.27", "creation_date" : "1611732606460", "number_of_replicas" : "1", "uuid" : "Ss4YOET8Rym1czi7CeyHgg", "version" : { "created" : "7100299" } } } }
} Cluster Health: yellow (6 of 7) Status Reason:Elasticsearch uses the default configuration (5 shards, 1 replica), but only single-node clusters are deployed. Since there is only one node, the cluster cannot place replicas and is in a yellow state。
number_of_shards refers to the number of shards to be made by the index, which can only be specified when the index is created, and cannot be modified later. number_of_replicas refers to how many copies each shard has, which can be dynamically modified later
primary shard: The primary shard, each document is stored in a shard, when you store a document, the system will first store it in the main shard, and then it will be copied to a different copy. By default, an index has 5 primary shards. You can set the number of shards in advance, and once the shard is created, the number of shards cannot be modified.
Replica shard: Replica shard, each shard has zero or more replicas. Replicas are primarily replicated of the primary shard, which can increase high availability and improve performance. By default, a master assignment has one replica, but the number of replicas can be dynamically increased later in the configuration. The replica must be deployed on a different node, not on the same node as the primary shard.
solution
Use Kibana to send a PUT request to modify the index settings, as shown in the following image:
Or send the request using the curl command, which is as follows:
After modification, the ES status is normal, as shown in the following figure:
(End)
|