Elasticsearch 更新索引settings

1、更新索引设置:将副本减至0,修改索引分析器为ik_max_word和检索分词器为ik_smart

2、需要先将索引关闭,然后再PUT setings

POST user/_close

PUT user/_settings
{
  "number_of_replicas": 0,
  "index":{
    "analysis.analyzer.default.type":"ik_max_word",
    "analysis.search_analyzer.default.type":"ik_smart"
  }
}
POST user/_open

 

posted @ 2018-12-24 16:20  我是属车的  阅读(9397)  评论(0编辑  收藏  举报