我只有一个节点,我使用下面的脚本将副本设置为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?
发布于 2017-06-19 18:56:36
您只更改了单个索引的副本数量+属性名称错误(缺少index.
前缀)。
您需要对所有索引运行相同的查询
PUT /*/_settings
{
"index": {
"number_of_replicas" : 0
}
}
https://stackoverflow.com/questions/44627714
复制相似问题