elasticsearch修改默认分片数

elasticsearch6以上设置索引的默认分片数和副本数已经不是在elasticsearch.yml文件中了,更改启动会报错的,根据提示,是使用了一个索引模板的东西。
网上文档不少,不过统统都是互相抄袭,为啥知道都是互相抄?因为都用的中文双引号,是执行不了的,也是服了。
下面是可执行的版本。
设置全局分片数量:
put /_template/template_http_request_record
{
"index_patterns": ["*"],
"settings": {
"number_of_shards": 3,
"number_of_replicas": 1
}
}

posted @ 2023-05-18 12:00  plumemoon  阅读(683)  评论(0)    收藏  举报