• ES7.7中highlight的结果丢失部分文本的bug


    本bug在windows版本 ES 7.7.0 和 7.15.2 中都可以再现
    ik分词器已安装, 并导入了扩展停止词 extra_stopword.dic

    Step1, 先建立一个索引.

    在此之前, 请确保已经安装分词器插件ik

    PUT /test
    {
      "settings": {
        "number_of_shards": 1,
        "number_of_replicas": 0
      },
      "mappings": {
        "dynamic": "strict",
        "properties": {
          "title": {
            "type": "text",
            "analyzer": "ik_max_word",
            "search_analyzer": "ik_smart"
          }
        }
      }
    }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17

    Step2, 批量导入几笔数据:

    POST _bulk
    { "index" : { "_index" : "test", "_id" : "1" } }
    { "title" : "【aben sky found】 最大华人车行!限量超跑,优质二手车买卖,最高价现金收购二手车!" }
    { "index" : { "_index" : "test", "_id" : "2" } }
    { "title" : "【aben sky found】最大华人车行!限量超跑,优质二手车买卖,最高价现金收购二手车!" }
    { "index" : { "_index" : "test", "_id" : "3" } }
    { "title" : "Regenwald Leasing 最大华人车行!限量超跑,优质二手车买卖,最高价现金收购二手车!" }
    { "index" : { "_index" : "test", "_id" : "4" } }
    { "title" : "【Regenwald Leasing】最大华人车行!限量超跑,优质二手车买卖,最高价现金收购二手车!" }
    { "index" : { "_index" : "test", "_id" : "5" } }
    { "title" : "Regenwald Leasing 最大华人车行! 限量超跑,优质二手车买卖,最高价现金收购二手车!" }
    { "index" : { "_index" : "test", "_id" : "6" } }
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
  • 相关阅读:
    Linux常用命令 - 权限管理命令
    python实现.jpeg转.jpg
    MySQL (2)
    Spark概述及快速上手
    Apache SeaTunnel 2.3.4 版本发布:功能升级,性能提升
    修改huggingface的缓存路径
    从零学算法(LCR 135)
    zabbix执行钉钉python文件时 No module named ‘requests’
    【华为OD机试真题 python】竖直四子棋【2022 Q4 | 200分】
    kafka(四)消息类型
  • 原文地址:https://blog.csdn.net/aben_sky/article/details/126710117