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

相关推荐
Lhappy嘻嘻2 小时前
Java IO|File 文件操作 + 字节流 / 字符流完整笔记 + 递归删除文件实战
java·笔记·php
Championship.23.243 小时前
Linux 3.0 锁机制与故障排查详解
linux·运维·服务器
胡萝卜术3 小时前
从API调用到手写LRU:力扣146「LRU缓存」的哈希表+双向链表终极进化之路
前端·javascript·面试
科技道人3 小时前
记录 默认置灰/禁用 app ‘Search Engine Selector‘ 的disable按钮
开发语言·前端·javascript
伊玛目的门徒3 小时前
试用leetcode之典中典 二数之和问题
java·算法·leetcode
天疆说3 小时前
Zotero Connector 在 Edge 里找不到桌面 Zotero(Linux / Zotero 9.0.6 / Edge 150)
linux·前端·edge
李伟_Li慢慢4 小时前
02-从硬件说起WebGL
前端·three.js
风123456789~4 小时前
【Linux专栏】ls 排除某个文件
linux·运维·服务器
kyriewen5 小时前
看了微软几万人用AI编程的数据——效率涨24%的代价没人提
前端·ai编程·claude
2601_963771375 小时前
How to Scale Your WordPress Store Traffic in 2026
前端·php·plugin