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版后,问题解决

相关推荐
lay_liu4 小时前
springboot 文件下载
java·spring boot·后端
Flittly4 小时前
【SpringAIAlibaba新手村系列】(11)Embedding 向量化与向量数据库
java·笔记·spring·ai·springboot
ZPC82104 小时前
如何创建一个单例类 (Singleton)
开发语言·前端·人工智能
SEO-狼术4 小时前
Support Network Diagnostics in .NET
运维·服务器·网络
紫_龙4 小时前
最新版vue3+TypeScript开发入门到实战教程之重要详解readonly/shallowReadOnly
前端·javascript·typescript
workflower4 小时前
AI制造-推荐初始步骤
java·开发语言·人工智能·软件工程·制造·需求分析·软件需求
AI周红伟4 小时前
AI自动盯盘与定时行情分析:OpenClaw股票辅助Agent集成完整使用指南-周红伟
运维·服务器·人工智能·音视频·火山引擎
roamingcode5 小时前
前端 AI Agent 多智能体协作架构:从对抗式排查到工作流解耦
前端·人工智能·架构·agent·team
SPC的存折6 小时前
8、Ansible之Playbook---Roles
linux·服务器·ansible