三人行必有我师

全文检索 全标题查询匹配不到正确结果

Elasticsearch | 作者 q283714518 | 发布于2020年09月03日 | 阅读数:1324

数据:
2019年12月28日《中国式养老》完整版   
2019年12月28日《中央新闻联播》完整版
2019年12月28日《新闻30分》完整版
2019年12月28日《问政节目》完整版
...
 
索引用的ik分词器建的字段 "analyzer" : "ik_smart"。分析结果如下:
{
"tokens": [
{
"token": "2019年",
"start_offset": 0,
"end_offset": 5,
"type": "TYPE_CQUAN",
"position": 0
},
{
"token": "12月",
"start_offset": 5,
"end_offset": 8,
"type": "TYPE_CQUAN",
"position": 1
},
{
"token": "28日",
"start_offset": 8,
"end_offset": 11,
"type": "TYPE_CQUAN",
"position": 2
},
{
"token": "中国式",
"start_offset": 12,
"end_offset": 15,
"type": "CN_WORD",
"position": 3
},
{
"token": "养老",
"start_offset": 15,
"end_offset": 17,
"type": "CN_WORD",
"position": 4
},
{
"token": "完整版",
"start_offset": 18,
"end_offset": 21,
"type": "CN_WORD",
"position": 5
}
]
}

我复制标题   2019年12月28日《中国式养老》完整版   去检索,按理应该是完全匹配的在最前面,结果有时候直接就搜不出来或者排名特别靠后。
已邀请:

要回复问题请先登录注册