es 配置
IK Dictionary Configuration
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<comment>IK Analyzer 扩展配置</comment>
<!--用户可以在这里配置自己的扩展字典 -->
<entry key="ext_dict">custom/mydict.dic;custom/single_word_low_freq.dic</entry>
<!--用户可以在这里配置自己的扩展停止词字典-->
<entry key="ext_stopwords">custom/ext_stopword.dic</entry>
<!--用户可以在这里配置远程扩展字典 -->
<entry key="remote_ext_dict">location</entry>
<!--用户可以在这里配置远程扩展停止词字典-->
<entry key="remote_ext_stopwords">http://xxx.com/xxx.dic</entry>
</properties>
- 不能热词更新,每次修改词典都需要重启 ES
- 热词更新参见 使用 nginx 快速搭建 elasticsearch ik 远程词典服务
Kibana 测试
GET _analyze
{
"analyzer": "ik_smart",
"text": "三体"
}
本文出自 qbit snap
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论