ElasticSearch-IK分词

分词插件:https://github.com/medcl/elasticsearch-analysis-ik#quick-example

配置说明:https://github.com/medcl/elasticsearch-analysis-ik#quick-example

PUT http://192.168.40.108:9200/helpcenter/content/_mapping
content-type → application/json; charset=UTF-8
{
    "content": {
        "properties": {
            "content": {
                "type": "text",
                "analyzer": "ik_max_word",
                "search_analyzer": "ik_smart"
            },
            "category": {
                "type": "text",
                "analyzer": "ik_max_word",
                "search_analyzer": "ik_smart"
            }
        }
    }
}

猜你喜欢

转载自www.cnblogs.com/hfultrastrong/p/10860782.html