elasticsearch 布尔过滤器 游标查询 Scroll
2024-08-30 20:11:09
组合过滤器 | Elasticsearch: 权威指南 | Elastic https://www.elastic.co/guide/cn/elasticsearch/guide/current/combining-filters.html
这种情况下,我们需要 bool (布尔)过滤器。 这是个 复合过滤器(compound filter) ,它可以接受多个其他过滤器作为参数,并将这些过滤器结合成各式各样的布尔(逻辑)组合。
布尔过滤器
一个 bool 过滤器由三部分组成:
{
"bool" : {
"must" : [],
"should" : [],
"must_not" : [],
}
}
must
所有的语句都 必须(must) 匹配,与 AND 等价。
must_not
所有的语句都 不能(must not) 匹配,与 NOT 等价。
should
至少有一个语句要匹配,与 OR 等价。
游标查询 Scroll | Elasticsearch: 权威指南 | Elastic https://www.elastic.co/guide/cn/elasticsearch/guide/current/scroll.html
[root@hadoop3 xiaole_chk_url]# curl hadoop3:9200/direct_vote/kwaddress/_search?pretty=true -d "{"_source":false,"from":204500,"size":100}"
{
"error" : {
"root_cause" : [ {
"type" : "query_phase_execution_exception",
"reason" : "Result window is too large, from + size must be less than or equal to: [10000] but was [204600]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level parameter."
} ],
"type" : "search_phase_execution_exception",
"reason" : "all shards failed",
"phase" : "query",
"grouped" : true,
"failed_shards" : [ {
"shard" : 0,
"index" : "direct_vote",
"node" : "fIuqvDKQTgW2xLMofruOkA",
"reason" : {
"type" : "query_phase_execution_exception",
"reason" : "Result window is too large, from + size must be less than or equal to: [10000] but was [204600]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level parameter."
}
} ]
},
"status" : 500
}
[root@hadoop3 xiaole_chk_url]#
最新文章
- 获取iOS设备型号iphone ipad
- MyBatis中的resultType和resultMap
- 对数据库触发器new和old的理解
- response下载文件 (转载)
- C# 与C/C++相互调用
- 【英语】Bingo口语笔记(42) - Got系列
- 编译linux内核以及depmod的使用
- EasyUI兼容IE问题
- 利用switch语句计算特定的年份的月份共有几天。
- Cookie的基本使用
- QQ群开放接口
- Linux 宿主机安装 MiniGUI
- 网络协议之ipv6
- Android学习开发中如何保持API的兼容
- Shiro限制登录尝试次数
- ecplise中设置字符编码
- 【POI】java对excel的读写操作
- c/c++拷贝构造函数和关键字explicit
- Add Languages to Your Xamarin Apps with Multilingual App Toolkit
- Windows下nginx+tomcat实现简单的负载均衡