3、重启Elasticsearch
4、测试分词器
GET /_analyze
{
"text": "中华人民共和国国徽",
# 两种:ik_smart较粗粒度的拆分 和 ik_max_word较细粒度的拆分
"analyzer": "ik_max_word"
}
5、使用分词器 在模版中定义好分词
"settings": {
"index": {
"number_of_shards": "1",
"number_of_replicas": "0"
},
"analysis": {
"analyzer": {
"ik":{
"tokenizer" : "ik_max_word"
}
}
}
},
.......
"mappings": {
"_doc" : {
"dynamic_templates": [
{
"integers": {
"mapping": {
"type": "long"
},
"match