infinilabs / analysis-ik

🚌 The IK Analysis plugin integrates Lucene IK analyzer into Elasticsearch and OpenSearch, support customized dictionary.
Apache License 2.0
16.48k stars 3.27k forks source link

分单个字母a的时候, 分不了词,a还没了 #1038

Closed Gallium-Gu closed 8 months ago

Gallium-Gu commented 8 months ago

分单个字母a的时候, 分不了词,a还没了

GET /my_index/_analyze
{
  "text": "a",
  "analyzer": "ik_smart"
}
{
  "tokens" : [ ]
}

分单个字母b的时候不会有这样的问题

GET /my_index/_analyze
{
  "text": "b",
  "analyzer": "ik_smart"
}
{
  "tokens" : [
    {
      "token" : "b",
      "start_offset" : 0,
      "end_offset" : 1,
      "type" : "ENGLISH",
      "position" : 0
    }
  ]
}
Gallium-Gu commented 8 months ago

命中停用分词词典了