ES - IK分词器(中文的分词器)

什么是IK分词器?

 

 

安装IK分词器 - Windows

IK分词器和ES的版本号,一定要对应。否则容易闪退。

 

 

 

 

 

 

 

安装IK分词器 - Linux

 

 

 

然后docker restart elasticsearch, 即可生效

 

 

IK分词器讲解

1-查看不同的分词效果

ik_smart

 

 

ik_max_word

 

 

 2-自定义字库

自定义字库前,“狂神说”会被拆为三个独立的汉字;

自定义字库后,在kuang.dic中,加入“狂神说”之后就能分词分出“狂神说”,不再拆开。

 

 

 

 

 

 

posted on 2021-05-04 22:30  frank_cui  阅读(776)  评论(0编辑  收藏  举报

导航

levels of contents