简介:常⻅的中⽂分词器的介绍和使⽤
如果⽤默认的分词器standard
- POST localhost:9200/_analyze
{
"analyzer": "standard",
"text": "⽕箭明年总冠军"
}常⻅分词器
- smartCN ⼀个简单的中⽂或中英⽂混合⽂本的分词器
- IK分词器 更智能更友好的中⽂分词器
smartCn
- 安装 sh elasticsearch-plugin install analysis-smartcn
- 卸载 sh elasticsearch-plugin remove analysis-smartcn
- 检验
- 安装后重新启动
- POST localhost:9200/_analyze
{
"analyzer": "smartcn",
"text": "⽕箭明年总冠军"
}IK分词器
- 下载 https://github.com/medcl/elasticsearch-analysis-ik/releases
- 安装 解压安装到plugins⽬录
- 检验
- 安装后重新启动
- POST localhost:9200/_analyze
{
"analyzer": "ik_max_word",
"text": "⽕箭明年总冠军"
} 继续阅读与本文标签相同的文章
上一篇 :
mongodb取得数组元素中的匹配项目。
-
ElasticSearch(7.2.2)-es之query_string查询
2026-05-16栏目: 教程
-
系统安装||第二篇:U盘安装纯净系统,不带任何捆绑和劫持!
2026-05-16栏目: 教程
-
ElasticSearch(7.2.2)-es的排序查询
2026-05-16栏目: 教程
-
系统安装||第三篇:U盘pe模式安装纯净系统,不带任何捆绑和劫持!
2026-05-16栏目: 教程
-
近期面试Java后端的一些感悟
2026-05-16栏目: 教程
