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

相关推荐
captain3762 小时前
MyBatis(入门5)其他查询操作
java·数据库·spring boot·mybatis
jktantan2 小时前
Vue keep-alive 切标签后滚动位置回顶?因为 onDeactivated 里读到的 scrollTop 是 0
前端·javascript·vue.js
Novproxy_Z2 小时前
商用代理避坑:如何识别商家拿机房 IP 冒充住宅 IP
java·网络·tcp/ip
无足鸟ICT2 小时前
【RHCA+】vmstat命令(监控系统资源)
linux·服务器
垆边人似月.2 小时前
RDMA 文件传输踩坑(五):READY 发送成功后,为什么出现 Work Request Flushed Error?
服务器·网络·tcp/ip
闪亮的路灯2 小时前
Linux 安装mqtt服务mosquitto
linux·运维·服务器
HideF2 小时前
nmcli
linux·服务器·网络
文丑颜不良啊3 小时前
LeetCode1481~1500题目解析
java·leetcode
2601_962885723 小时前
quotes 字段全解:涨跌幅、振幅、换手率的口径与单位
java·前端·spring
excel3 小时前
encodeURI 和 encodeURIComponent 有什么区别?
前端