analysis-ik
analysis-ik copied to clipboard
ik_max_word 的分词能否包含ik_smart的分词
比如 关键词 “512寸红色”, ik_max_word 不包含 ik_smart 里面的 “512寸”
ik_smart:
{
"tokens" : [
{
"token" : "512寸",
"start_offset" : 0,
"end_offset" : 4,
"type" : "TYPE_CQUAN",
"position" : 0
},
{
"token" : "红色",
"start_offset" : 4,
"end_offset" : 6,
"type" : "CN_WORD",
"position" : 1
}
]
}
ik_max_word:
{ "tokens" : [ { "token" : "512", "start_offset" : 0, "end_offset" : 3, "type" : "ARABIC", "position" : 0 }, { "token" : "寸", "start_offset" : 3, "end_offset" : 4, "type" : "COUNT", "position" : 1 }, { "token" : "红色", "start_offset" : 4, "end_offset" : 6, "type" : "CN_WORD", "position" : 2 }, { "token" : "红", "start_offset" : 4, "end_offset" : 5, "type" : "CN_WORD", "position" : 3 }, { "token" : "色", "start_offset" : 5, "end_offset" : 6, "type" : "CN_CHAR", "position" : 4 } ] }
自定义词,否者不能;因为ik_max_word和ik_smart分词方式不同