elasticsearch7.5 索引状态yellow问题解决
我的服务是windows单机服务并没有做集群。查看下目前索引的状态GET _cluster/health执行结果{"cluster_name" : "dev","status" : "yellow","timed_out" : false,"number_of_nodes" : 1,"number_of_data_nodes" : 1,"active_primary_shards" : 36,"a
·
我的服务是windows单机服务并没有做集群。查看下目前索引的状态
GET _cluster/health
执行结果
{
"cluster_name" : "dev",
"status" : "yellow",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 36,
"active_shards" : 36,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 60,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 37.5
}
状态为yellow,副本分片数2
GET /index/_settings
{
"index" : {
"settings" : {
"index" : {
"number_of_shards" : "30",
"provided_name" : "product_dev",
"max_result_window" : "2147483647",
"creation_date" : "1611582359306",
"number_of_replicas" : "2",
"uuid" : "l7eYTZHsQkCF0Z4iquGG7w",
"version" : {
"created" : "7050299"
}
}
}
}
}
在单机情况下是不需要设置副本分区数。调整副本分区数为0,就🆗
PUT /index/_settings
{ "number_of_replicas":0 }
{
"acknowledged" : true
}
查看下状态,status已经为green
{
"cluster_name" : "dev",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 36,
"active_shards" : 36,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 0,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 100.0
}
更多推荐
已为社区贡献2条内容
所有评论(0)