elasticsearch5.6.8中文分词器
2024-08-25 12:08:32
安装分词器,务必确保版本一致!
下载地址:https://github.com/medcl/elasticsearch-analysis-ik
为了保证一致,我特地将elasticsearch进行降级。
ik_smart
GET _analyze?pretty
{
"analyzer": "ik_smart",
"text": "中华人民共和国国歌"
}
{
"tokens": [
{
"token": "中华人民共和国",
"start_offset": 0,
"end_offset": 7,
"type": "CN_WORD",
"position": 0
},
{
"token": "国歌",
"start_offset": 7,
"end_offset": 9,
"type": "CN_WORD",
"position": 1
}
]
}
ik_max_word
GET _analyze?pretty
{
"analyzer": "ik_max_word",
"text": "中华人民共和国国歌"
}
{
"tokens": [
{
"token": "中华人民共和国",
"start_offset": 0,
"end_offset": 7,
"type": "CN_WORD",
"position": 0
},
{
"token": "中华人民",
"start_offset": 0,
"end_offset": 4,
"type": "CN_WORD",
"position": 1
},
{
"token": "中华",
"start_offset": 0,
"end_offset": 2,
"type": "CN_WORD",
"position": 2
},
{
"token": "华人",
"start_offset": 1,
"end_offset": 3,
"type": "CN_WORD",
"position": 3
},
{
"token": "人民共和国",
"start_offset": 2,
"end_offset": 7,
"type": "CN_WORD",
"position": 4
},
{
"token": "人民",
"start_offset": 2,
"end_offset": 4,
"type": "CN_WORD",
"position": 5
},
{
"token": "共和国",
"start_offset": 4,
"end_offset": 7,
"type": "CN_WORD",
"position": 6
},
{
"token": "共和",
"start_offset": 4,
"end_offset": 6,
"type": "CN_WORD",
"position": 7
},
{
"token": "国",
"start_offset": 6,
"end_offset": 7,
"type": "CN_CHAR",
"position": 8
},
{
"token": "国歌",
"start_offset": 7,
"end_offset": 9,
"type": "CN_WORD",
"position": 9
}
]
}
最新文章
- 基于zepto的移动端日期+时间选择插件
- 是不是content-type: text/html的数据包一到,浏览器就肯定刷新页面?
- 黑马程序员——JAVA基础之异常处理机制
- OpenWrt编译到底脚本
- Error Code: 1175
- libpq程序例子
- ajax、form提交乱码
- DEMO阶段已完成,今天,要深入钻
- SaberRD之交流分析
- java.util.ConcurrentModificationException异常排查
- 曾经进公司面试的C语言有关指针和数组的笔试题
- Spring Cloud中的负载均衡策略
- 性能调优9:根据WaitType诊断性能
- 《Nosql精粹》—— 读后总结
- brctl 命令详解
- ZBench: 服务器一键测试脚本 / 自带结果导出vps网络测试
- Python抓取远程文件获取真实文件名
- ARM汇编程序闪烁灯与其反汇编代码比较
- BZOJ 2002: [Hnoi2010]Bounce 弹飞绵羊 动态树
- Python高级教程-高阶函数
热门文章
- MapReduce程序——WordCount(Windows_Eclipse + Ubuntu14.04_Hadoop2.9.0)
- Ajax-08 跨域获取最新电视节目清单实例
- @ResponseBody与@RestController的作用与区别
- cassandra压力测试
- ARM汇编指令集4
- Maven项目中java类报错-Cannot resolve symbol
- [转载] ffmpeg Windows下采集摄像头一帧数据,并保存为bmp图片
- 狗狗有关的知识tips
- 拦截器springmvc防止表单重复提交【3】自己实际项目
- C语言内存对齐对则