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. 配置yum仓库:yum install 软件

    1.一个重要模板: 进入/etc/yum.repos.d文件夹,新建一个xiaoxu.repo文件,其中xiaoxu可以根据需要来取名. [模板] vim  xiaoxu.repo [rhel]    ...

  2. LED Decorative Light Manufacturer - Decorative Lighting: Functionality And Aesthetics

    Whether it is for general ambient lighting, task lighting or accent lighting, the decorative lightin ...

  3. Oracle中的数据迁移到Mysql数据库中的方式Navicat premium工具

    1.安装 Navicat premium工具 2.破解 Navicat premium工具 3.连接需要相互迁移的两个库Mysql和Oracle(可以是远程的或者本机的数据库都是可以的) 4.连接上之 ...

  4. Oracle的表空间、用户和表的区别和联系

    Oracle的表空间.用户和表的区别和联系 Oracle数据库是通过表空间来存储实际存在的那些表.索引.视图的, 表空间分类: 临时表空间:   用于存储数据库中单持久性模型对象,如表.索引.视图等, ...

  5. CentOS 7 使用笔记

    一.下载.解压或安装等命令: 目前自己用过的三个下载及安装命令:curl.wget.yum. yum用法: $ sudo yum install libpng16-1.6.29-alt1.i586.r ...

  6. 使用datatable动态添加的顺序与存储的顺序不一致

    原因是datatable在展示数据的时候帮助我们排序了 将其禁止排序即可:"ordering":false

  7. springmvc、 springboot 项目全局异常处理

    异常在项目中那是不可避免的,通常情况下,我们需要对全局异常进行处理,下面介绍两种比较常用的情况. 准备工作: 在捕获到异常的时候,我们通常需要返回给前端错误码,错误信息等,所以我们需要手动封装一个js ...

  8. 解决tomcat控制台乱码问题

    问题原因:编码不一致,tomcat启动后默认编码UTF-8,而windows的默认编码是GBK.所以只需配置启动tomcat后为GBK编码即可. 做法:找到路径 $xxx$\apache-tomcat ...

  9. samba对外开放的端口

    前言搭建samba的时候,如果是在内网\测试环境中,可以直接关闭防火墙,但是如果是在外网情况下,需要对防火墙开放某些端口.开放的具体步骤,下面我们来看. 操作步骤1.添加端口 firewall-cmd ...

  10. python在线测试代码及教程

    python/Java在线测试代码:http://www.pythontutor.com/visualize.html#mode=edit廖雪峰Python教学:https://www.liaoxue ...