ElasticSearch中让一个字段支持多个分析器

POST /kid_book_v13/kid_book/_mapping
{
  "properties": {
      "search": {
          "type": "text",
          "analyzer": "ik_syno",
          "search_analyzer": "ik_max_word_xhs",
          "fields": {
            "ngram": {
              "type": "text",
              "analyzer": "analyzer_user"
            }
          }
      }
  }
}

猜你喜欢

转载自www.cnblogs.com/ilovejesus/p/12582968.html