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

相关推荐
IT_陈寒39 分钟前
SpringBoot这个自动配置坑我跳了三次
前端·人工智能·后端
kyriewen42 分钟前
我用 AI 一周写完了整个项目,上线第一天就崩了——这是我踩过最贵的 5 个坑
前端·javascript·ai编程
牧艺1 小时前
从零到协同:构建类飞书在线文档系统的五个技术重难点
前端·人工智能
用户3521802454752 小时前
当 Prompt 学会"热更新":Spring Boot × Nacos3 AI 实战
java·spring boot·ai编程
红尘散仙2 小时前
想写一个像样的终端 App?试试把 React 的开发体验搬进 Rust TUI
前端·rust
袋鼠云数栈UED团队3 小时前
一套 Spec-First 的 AI 编程工作流
前端·人工智能
袋鼠云数栈前端3 小时前
一套 Spec-First 的 AI 编程工作流
前端·ai+
angerdream3 小时前
Android手把手编写儿童手机远程监控App之vue3 路由守卫
前端
不服老的小黑哥3 小时前
AI规范驱动编程-harness工程项目实战
前端
vivo互联网技术3 小时前
从 Web 到桌面:基于 Tauri 2.0 + Vue 3 打造 vivo 线下门店「大头贴」拍照体验系统
前端·rust