Q:有两个人掉到陷阱里了,死的人叫死人,活人叫什么?

ik分词问题

Elasticsearch | 作者 dengyao | 发布于2019年07月22日 | 阅读数:1400

ik分词配置了自己的扩展字典,查询分词结果只有在扩展字典中的添加的词才会分出来,其他没有添加的都分不出来
http://localhost:9200/text-con ... xt%3D不考虑投诉你不弄不想感谢甘心感性&pretty
分词出来的结果:
{
  "tokens" : [ {
    "token" : "不考虑",
    "start_offset" : 0,
    "end_offset" : 3,
    "type" : "CN_WORD",
    "position" : 0
  }, {
    "token" : "投诉你",
    "start_offset" : 3,
    "end_offset" : 6,
    "type" : "CN_WORD",
    "position" : 1
  }, {
    "token" : "不弄",
    "start_offset" : 6,
    "end_offset" : 8,
    "type" : "CN_WORD",
    "position" : 2
  }, {
    "token" : "不想",
    "start_offset" : 8,
    "end_offset" : 10,
    "type" : "CN_WORD",
    "position" : 3
  } ]
}
 
“不考虑,投诉你,不弄,不想”这四个词在扩展字典中配置了,可以分出来,其他的分不出来。麻烦问一下各位大佬什么原因
已邀请:

bellengao - 博客: https://www.jianshu.com/u/e0088e3e2127

赞同来自:

不设置扩展字典能分出来吗

要回复问题请先登录注册