elasticsearch设置默认分词器和字段指定分词器

PUT news
{
  "settings": {
    "index.analysis.analyzer.default.type": "ik_max_word"
    }
  },
  "mappings": {
    "_doc": {
      "properties": {
        "tags": {
          "type":     "text",
          "analyzer": "whitespace"
        }
      }
    }
  }
}

猜你喜欢

转载自blog.csdn.net/WitsMakeMen/article/details/80861025