Blog · TrumanWong

Elasticsearch修改索引分词器

TrumanWong

说明:索引创建后必须先关闭索引,添加完成后,再及时打开索引进行搜索等操作,否则将报错。

# 关闭索引
POST system_drivers/_close

# 修改分词器为ik分词器
PUT system_drivers/_settings
{
  "index": {
    "analysis.analyzer.default.type": "ik_max_word"
  }
}

# 打开索引
POST system_drivers/_open
Continuer

Ces contenus peuvent aider ensuite

Recommandations liees, historique et articles enregistres.