ES报错信息:

{
"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 [200000000]. 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 setting."
}
],
"type": "search_phase_execution_exception",
"reason": "all shards failed",
"phase": "query",
"grouped": true,
"failed_shards": [
{
"shard": 0,
"index": "view_log",
"node": "f7Mhj8hJTbCecKixd2ZFIQ",
"reason": {
"type": "query_phase_execution_exception",
"reason": "Result window is too large, from + size must be less than or equal to: [10000] but was [200000000]. 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 setting."
}
}
],
"caused_by": {
"type": "query_phase_execution_exception",
"reason": "Result window is too large, from + size must be less than or equal to: [10000] but was [200000000]. 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 setting."
}
},
"status": 500
}

执行语句:

POST:

http://127.0.0.1:9200/demo/_search

body:

{
"query": {
"bool": {
"filter": [
{
"match": {
"userid": "f8d3e9ad7ec3482a9f92318eb18f8173"
}
}
] }
},
"from": 0,
"size": 200000000
}

原因:从上面的报错信息,可以看到ES提示我结果窗口太大了,目前最大值为10000,而我却要求给我10000000。并且在后面也提到了要求我修改index.max_result_window参数来增大结果窗口大小。

解决:

POST:

http://127.0.0.1:9200/demo/_settings

body:

{
"index": {
"max_result_window": 100000000
}
}

query_phase_execution_exception的更多相关文章

  1. ES踩坑笔记

    现在开始在业务上使用ES,记录一些踩坑经历,做点笔记. 2018-11-13 source不返回问题 使用了角色校验,客户端插入成功之后获取数据没有source,和查询参数无关. 检查mapping, ...

  2. 让Logstash每次都从头读文件及常见问题

    input { file { path => ["/data/test.log"] start_position => "beginning" si ...

  3. elasticsearch 大量数据翻页到后面无数据解决

    默认情况下报错信息:from + size 不能大于10000 {"error":{"root_cause":[{"type":" ...

  4. elasticsearch 布尔过滤器 游标查询 Scroll

    组合过滤器 | Elasticsearch: 权威指南 | Elastic https://www.elastic.co/guide/cn/elasticsearch/guide/current/co ...

  5. Result window is too large, from + size must be less than or equal to [10000]

    使用sql插件执行如下语句的时候报错http://10.127.0.1:9200/_sql?sql=select * from test limit 1000000 错误信息:{"error ...

  6. 解决 Elasticsearch 超过 10000 条无法查询的问题

    解决 Elasticsearch 超过 10000 条无法查询的问题 问题描述 分页查询场景,当查询记录数超过 10000 条时,会报错. 使用 Kibana 的 Dev Tools 工具查询 从第 ...

  7. Result window is too large, from + size must be less than or equal to: [10000] but was [78440]. See the scroll api for a more efficient way to request large data sets

    {"error":{"root_cause":[{"type":"query_phase_execution_exception& ...

  8. es分页条数限制

    "error": { "root_cause": [ { "type": "query_phase_execution_excep ...

  9. elasticserach数据库深度分页查询的原理

    深度分页存在的问题 https://segmentfault.com/a/1190000019004316?utm_source=tag-newest 在实际应用中,分页是必不可少的,例如,前端页面展 ...

随机推荐

  1. Codeforces Round #620 (Div. 2)E(LCA求树上两点最短距离)

    LCA求树上两点最短距离,如果a,b之间距离小于等于k并且奇偶性与k相同显然YES:或者可以从a先走到x再走到y再走到b,并且a,x之间距离加b,y之间距离+1小于等于k并且奇偶性与k相同也输出YES ...

  2. Go_Redis

    Redis介绍 Redis是一个开源的内存数据库,Redis提供了多种不同类型的数据结构,很多业务场景下的问题都可以很自然地映射到这些数据结构上.除此之外,通过复制.持久化和客户端分片等特性,我们可以 ...

  3. 题解 P6013 【压岁钱】

    月赛\(\text{Div2T1}\),窝唯一一道\(\text{AC}\)的题(我太菜啦!) \(\text{solution:}\) 根据题面,显然三个操作对应三种情况,我们发现每次这三种操作均不 ...

  4. 最详细的linux安装php过程

    本文主要和大家分享最详细的linux安装php过程,然后写好了nginx的安装配置,后面就是php的安装和mysql的安装,不过时间有限,而且放篇里也太长,所以都是分开来写,php安装完毕后就是mys ...

  5. Python requests库模拟浏览器行为的一些技巧记录

    如下都是一些经验之谈,不定期更新,喜欢可以关注哦. 忽略ssl报错 一些证书问题会导致程序报错,解决方法为在发送请求的时候,带上verify=False参数即可: result = requests. ...

  6. webpack-高级-发布策略

    webpack的发布策略 在实际开发中,一般会有两套项目方案: 一套是开发期间的项目,包含了测试文件.测试数据.开发工具.测试工具等相关配置,有利于项目的开发和测试,但是这些文件仅用于开发,发布项目时 ...

  7. typedef基本用法

    [代码演示] 例一 例二 例三

  8. opencv:形态学操作-腐蚀与膨胀

    #include <opencv2/opencv.hpp> #include <iostream> using namespace cv; using namespace st ...

  9. [远古回忆]发现了以前的一些wow截图 这里也备份一下

    看邮箱里面通知 网易相册24号就停服了..赶紧找到以前的账号登录了进去瞅瞅 看看有什么重要的东西需要备份的 想不到发现了很多惊喜 虽然因为年代久远和网易相册提供的免费服务 很多文件图片和其他资料有接近 ...

  10. base64加/解密算法C++实现

    base64编码原理:维基百科 - Base64 其实编码规则很简单,将字符串按每三个字符组成一组,因为每个字符的 ascii 码对应 0~127 之间(显然,不考虑其他字符集编码),即每个字符的二进 ...