当前位置: 首页 > article >正文

elasticsearch 7.6.2版本即使使用wildcard模糊查询,也毫无过滤效果分析

es使用wildcard方法查询attacker_ip不起效果

curl -X GET "localhost:9200/<index_name>/_search?pretty" -H 'Content-Type: application/json' -d' 

{

    "from": 0,

    "size": 20,

    "timeout": "60s",

    "query": {

        "bool": {

            "must": [

                {

                    "wildcard": {

                        "attacker_ip": {

                            "wildcard": "*10.88.3.*",

                            "boost": 1.0

                        }

                    }

                },

                {

                    "range": {

                        "modify_time": {

                            "from": 1734434659076,

                            "to": 1734521059076,

                            "include_lower": true,

                            "include_upper": true,

                            "boost": 1.0

                        }

                    }

                },

                {

                    "match": {

                        "leader": {

                            "query": true,

                            "operator": "OR",

                            "prefix_length": 0,

                            "max_expansions": 50,

                            "fuzzy_transpositions": true,

                            "lenient": false,

                            "zero_terms_query": "NONE",

                            "auto_generate_synonyms_phrase_query": true,

                            "boost": 1.0

                        }

                    }

                }

            ],

            "adjust_pure_negative": true,

            "boost": 1.0

        }

    },

    "sort": [

        {

            "modify_time": {

                "order": "desc"

            }

        }

    ]

}

解决方法:需要升级elasticsearch版本,从7.6.2升级至7.10.2版后,问题解决


http://www.kler.cn/a/444226.html

相关文章:

  • 实操给桌面机器人加上超拟人音色
  • 【21天学习AI底层概念】day8 适合新手免费训练 AI 模型的网站和平台
  • Redis篇-15--数据结构篇7--Sorted Set内存模型(有序集合,跳跃表skip list,压缩列表ziplist)
  • 使用VLC 搭建 RTSP 服务器
  • 监控易平台:提升IDC 数据中心运维效率与质量
  • RestTemplate实时接收Chunked编码传输的HTTP Response
  • GPT-Omni 与 Mini-Omni2:创新与性能的结合
  • 宝塔SSL证书申请失败,报错:申请SSL证书错误 module ‘OpenSSL.crypto‘ has no attribute ‘sign‘(已解决)
  • 探秘数据库索引:功能、意义与实例
  • C++ 的 format 和 vformat 函数
  • 源码安装PHP-7.2.19
  • HCIA-Access V2.5_4_3_VLAN间路由
  • 射频测试入门学习(三)——程控仪器是怎样和电脑连接通信的
  • Electron-Vue 开发下 dev/prod/webpack server各种路径设置汇总
  • 在ESP32使用AT指令集与服务器进行TCP/IP通信时,<link ID> 解释
  • ref 和 reactive 你觉得在项目中使用那个更合适
  • 5G 车联网赋能消防车调度,推动高效智能消防救援
  • 基于DockerCompose搭建Redis主从哨兵模式
  • 系列5:基于Centos-8.6 Kubernetes master节点允许运行pod节点
  • Anaconda安装(2024最新版)