例如以下查询无法匹配2018,请问有没有解决办法?
GET _analyze?pretty
{
  "analyzer": "ik_smart",
  "text": "恒大积分2018"
}
{
  "tokens": [
    {
      "token": "恒",
      "start_offset": 0,
      "end_offset": 1,
      "type": "CN_CHAR",
      "position": 0
    },
    {
      "token": "大",
      "start_offset": 1,
      "end_offset": 2,
      "type": "CN_CHAR",
      "position": 1
    },
    {
      "token": "积分",
      "start_offset": 2,
      "end_offset": 4,
      "type": "CN_WORD",
      "position": 2
    }
  ]
}
 
	
3 个回复
laoyang360 - 《一本书讲透Elasticsearch》作者,Elastic认证工程师 [死磕Elasitcsearch]知识星球地址:http://t.cn/RmwM3N9;微信公众号:铭毅天下; 博客:https://elastic.blog.csdn.net
赞同来自:
和你一样的检索匹配如下,
如上,并且不论是粗粒度还是细粒度都包含的。
更进一步如果你想完全匹配可以通过"match_phrase”短语匹配实现。
更多讨论参考:https://www.zhihu.com/question/26424192
dotNetDR_ - elasticsearch 6.x
赞同来自:
yayg2008
赞同来自: