测试标准分词器
post
http://localhost:9200/_analyze
{
"analyzer": "standard",
"text" : "中国人"
}
ik分词器安装使用
下载
https://github.com/medcl/elasticsearch-analysis-ik/releases
在es的plugins目录下新建analysis-ik目录
将ik.zip包解压到此目录
重启es
测试
post
http://localhost:9200/_analyze
{
"analyzer": "ik_smart",
"text" : "中国人是勤劳的"
}
或者
{
"analyzer": "ik_max_word",
"text" : "中国人是勤劳的"
}