Elasticsearch 6.2.3版本 filtered 报错问题 no [query] registered for [filtered]
背景描述
近期在学习《Elasticsearch 权威指南》上的一些基本命令,在操作到 filtered 进行过滤查询的时候,报错 “no [query] registered for [filtered]”。
1)查询语句如下:
GET _search
{
"query":{
"filtered":{
"filter":{
"range":{
"age":{
"gt":30
}
}
},
"query":{
"match":{
"last_name":"smith"
}
}
}
}
}
2)报错信息如下:
{
"error": {
"root_cause": [
{
"type": "parsing_exception",
"reason": "no [query] registered for [filtered]",
"line": ,
"col": 20
}
],
"type": "parsing_exception",
"reason": "no [query] registered for [filtered]",
"line": 3,
"col": 20
},
"status": 400
}
3)Kibana 的 Dev Tools 执行截图如下:

原因分析
Elasticsearch 在 5.0版本后,将 filtered 替换成了bool。
解决方案
1)正确的过滤查询语句如下:
GET _search
{
"query" : {
"bool" : {
"filter" : {
"range" : {
"age" : {
"gt" : 30
}
}
},
"must" : {
"match" : {
"last_name" : "Smith"
}
}
}
}
}
2)Kibana 的 Dev Tools上执行截图如下:

Elasticsearch 6.2.3版本 filtered 报错问题 no [query] registered for [filtered]的更多相关文章
- mysql5.6版本备份报错
MySQL5.6版本备份报错,密码不安全 [root@centos199 mysql]# mysqldump -uroot -ppassword cz-office > mysql38.sqlW ...
- 从高版本JDK换成低版本JDK报错Unsupported major.minor version 52.0的解决方案
从高版本JDK换成低版本JDK报错Unsupported major.minor version 52.0 java.lang.UnsupportedClassVersionError: PR/Sor ...
- python3.7环境下创建app、运行Django1.11版本项目报错Generator expression must be parenthesized
有些同学喜欢追求新鲜感~但追求新鲜感终归是要付出一点点代价的 在编程领域有一句至理名言:用东西不要用最新的! 就像每次苹果系统的升级都会有相当一部分用户的手机成砖一样 下面我们就介绍一个因版本升级带来 ...
- python3.7环境下创建app,运行Django1.11版本项目报错SyntaxError: Generator expression must be parenthesized
咳咳!!! 今天用命令行创建django项目中的app应用,出现了这样一个错误 这个错误在python3.6版本下安装运行django 1.11版本正常运行,但python3.7版本下运行django ...
- phpstudy切换的php7.1版本php-cgi报错
phpstudy切换的php7.1版本php-cgi报错 是因为没有装对应vc的插件. 下载地址:https://www.microsoft.com/zh-CN/download/details.as ...
- MySQL查询报错 ERROR: No query specified
今天1网友,查询报错ERROR: No query specified,随后它发来截图. root case:查询语法错误 \G后面不能再加分号;,由于\G在功能上等同于;,假设加了分号,那么就是;; ...
- mybatis使用map传递多参数报错:A query was run and no Result Maps were found for the Mapped Statement
在使用mybatis进行多参数传递时,报错: A query was run and no Result Maps were found for the Mapped Statement 'xx.xx ...
- mybatis报错:A query was run and no Result Maps were found for the Mapped Statement、、Property [login_ip] not found on type [com.thinkgem.jeesite.common.permission.entity.PremissUser]问题解决
今天在做ssm项目的时候出现了: 先是出现 了错误: mybatis报错:A query was run and no Result Maps were found for the Mapped St ...
- elaticsear no [query] registered for [filtered] 错误
1.问题描述 执行语句: GET /megacorp/employee/_search { "query" : { "filtered" : { "f ...
随机推荐
- FTP部署与使用
1.1 环境检查 [root@www ~]# cat /etc/redhat-release #系统版本,6系列等区别不大,都可以 CentOS Linux release 7.5.1804 (Cor ...
- 关于 Vue 微信客户端 不能播放音乐(报错和不能播放的问题)
前言 用vue 做音乐播放的时候,在本地可以打开播放,但在微信里面不能播放音乐 所以这样解决 // 音乐播放 audioPlay(){ let _this = this; var audio = _t ...
- C语言的函数声明,定义,调用以及exit退出
#include <stdio.h> #include <stdlib.h> void singing(); int main() { singing(); system(&q ...
- springmvc4.3.7中使用RequestBody,传入json参数时,得到错误415 Unsupported Media Type
在新建一个maven的项目的时候,当时并非springboot项目,是通过xml来配置的项目.在项目中DispatcherServlet的配置文件中配置了annotation-driven的, < ...
- 【leetcode】1262. Greatest Sum Divisible by Three
题目如下: Given an array nums of integers, we need to find the maximum possible sum of elements of the a ...
- mysql 报错从 新安装
卸载从新安装,综合运用 https://www.jb51.net/article/146050.htm https://www.jb51.net/article/90275.htm https://w ...
- 12.Python数值类型(整形、浮点型和复数)及其用法
实际开发中,我们经常需要使用数字记录游戏中用户的得分.游戏中角色的生命值.伤害值等信息,Python 语言提供了数值类型用于保存这些数值. 需要注意的是,Python 中这些数值类型都是不可改变的,也 ...
- ubuntu搭建、安装gitlab服务器以及初始化密码
本为14.04 在搭建之前要确定其网络环境是没有问题.用root身份进行操作 1.安装和配置必要的依赖关系 apt-get update apt-get install -y curl openssh ...
- Unity3D_(插件)使用Camera渲染制作Minimap小地图
制作小地图:使用Camera渲染出来Render Texture 原理:使用摄像机从上到下获得场景游戏物体,摄像机Culling Mask渲染层级可设置是否需要在小地图上展示游戏物体,将摄像机获得的场 ...
- vue计算属性详解
一.什么是计算属性 模板内的表达式非常便利,但是设计它们的初衷是用于简单运算的.在模板中放入太多的逻辑会让模板过重且难以维护.例如: <div id="example"> ...