gpt4 book ai didi

json - 如何将elasticsearch状态从黄色变为绿色?

转载 作者:行者123 更新时间:2023-12-03 00:40:18 24 4
gpt4 key购买 nike

我只有一个节点,我使用以下脚本将副本设置为 0,将分片设置为 1:

PUT /my_temp_index
{
"settings": {
"number_of_shards" : 1,
"number_of_replicas" : 0
}
}

输出:

{
"cluster_name": "KMT",
"status": "yellow",
"timed_out": false,
"number_of_nodes": 1,
"number_of_data_nodes": 1,
"active_primary_shards": 452,
"active_shards": 452,
"relocating_shards": 0,
"initializing_shards": 0,
"unassigned_shards": 451,
"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": 50.055370985603545
}

更改后是否必须重新启动 elasticsearch?

最佳答案

您只更改了单个索引的副本数 + 属性名称错误(缺少 index. 前缀)。

您需要对所有索引运行相同的查询

PUT /*/_settings
{
"index": {
"number_of_replicas" : 0
}
}

关于json - 如何将elasticsearch状态从黄色变为绿色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44627714/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com