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

相关推荐
2401_8332693023 分钟前
Java网络编程入门
java·开发语言
金銀銅鐵36 分钟前
[Java] 如何将 Lambda 表达式对应的类保存到 class 文件中?
java·后端
それども1 小时前
Gradle 构建疑难杂症 Could not find netty-transport-native-epoll-linux-aarch_64.ja
java·服务器·gradle·maven
正儿八经的少年2 小时前
application.yml 系列配置文件作用与区别
java·配置文件
李白的天不白2 小时前
SSR服务端渲染
前端
鱼很腾apoc2 小时前
【学习篇】第20期 超详解 C++ 多态:从语法规则到底层原理
java·c语言·开发语言·c++·学习·算法·青少年编程
NightReader2 小时前
CPU 高使用率,怎么降下来
运维·服务器
cheems95273 小时前
[Spring MVC] 统一功能与拦截器实践总结
java·spring·mvc
卷帘依旧3 小时前
SSE(Server-Sent Events)完全指南
前端
码云之上3 小时前
万星入坞:我们如何用三层插件体系干掉巨石应用
前端·架构·前端框架