https://www.cnblogs.com/xietianhua/p/11345641.html
https://blog.csdn.net/zhangsaho/article/details/104005741
https://www.elastic.co/guide/cn/elasticsearch/guide/current/index-settings.html
例如,我们可以创建只有 一个主分片,没有副本的小索引:
PUT /my_temp_index
{
"settings": {
"number_of_shards" : 1,
"number_of_replicas" : 0
}
}
然后,我们可以用 update-index-settings API 动态修改副本数:
PUT /my_temp_index/_settings
{
"number_of_replicas": 1
}
PUT方式
http://localhost:9200/索引名称
参数
{
"settings":{
"number_of_shards":1,
"number_of_replicas":0
}
}
如有问题,可以QQ搜索群1028468525加入群聊,欢迎一起研究技术
转载请注明:ES-单机创建索引,status不变黄色的方式 出自老鄢博客 | 欢迎分享