首页 > 其他分享 >Elasticsearch(es)查询报错:Result window is too large, from + size must be less than or equal to: [10000]

Elasticsearch(es)查询报错:Result window is too large, from + size must be less than or equal to: [10000]

时间:2023-04-03 10:33:23浏览次数:39  
标签:index 10000 less large window 报错 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 [20000]. 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":"export","node":"scF9aemwTUuv9t0jPF0PrA","reason":{"type":"query_phase_execution_exception","reason":"Result window is too large, from + size must be less than or equal to: [10000] but was [20000]. 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}

 

es默认只能查询一万条,超过条数限制就需要设置索引

修改索引设置

PUT export/_settings
{
  "index.max_result_window":100000
}

export是索引名称 ,上面表示修改查询限制为十万条

es不要查询大数据量,会很消耗内存

标签:index,10000,less,large,window,报错,es
From: https://www.cnblogs.com/pxblog/p/17282331.html

相关文章

  • java 启动错误idea 不报错误
    penapi.actionSystem.impl.Utils-updatefailedforAnAction(com.intellij.execution.ExecutorRegistryImpl$ExecutorAction)withID=MyBatisLogPluginjava.lang.IllegalStateException:@NotNul在项目拉取启动的时候就报出了这个错误首先查看idea的日志到底是什么报错 ......
  • Linux|--sh脚本|--文件执行报错::Error response from daemon: invalid reference for
    前言由于Linux中的docker镜像和容器需要批量处理,所以搞一个脚本,直接一下处理了,1.我在Windows10的本机电脑上新建了一个"test.sh"文件2.将"test.sh"文件上传到Linux环境中3.在Linux中执行"shtest.sh"4.报错了...第一次报错信息[root@VM-4-3-centostest_api]#shdock......
  • 预处理器 Less 的十个语法
    Less是一门CSS预处理语言,它扩充了CSS语言,增加了诸如变量、混合(mixin)、函数等功能,让CSS更易维护、方便制作主题、扩充。不过浏览器只能识别CSS语言,所以Less语言直接运行在浏览器端是不被识别的,需要我们通过一些方式将其先转成CSS,再将CSS资源加载到浏览器中。如何......
  • Hadoop报错只no such file or drector exist.
    场景:在运行bin.hdfsdfs-mkdirXXXXXXXXX的命令的时候报此路径或者文件不存在。   解决办法:hadoopfs-mkdir-p/user/hadoop/TRANSLATEwithxEnglishArabicHebrewPolishBulgarianHindiPortugueseCatalanHmongDawRomanianChi......
  • SSM使用Druid数据源出现循环报错
    解决方法在数据库连接配置db.properties文件中的属性前增加前缀xml配置<beanid="dataSource"class="com.alibaba.druid.pool.DruidDataSource"><propertyname="username"value="${jdbc.username}"/>......
  • Current request is not a multipart request 在tinymce中用XMLHttpRequest上传图片
    1、尝试解决。将header的content-type参数的值改为multipart/form-data。接着就报了therequestwasrejectedbecausenomultipartboundarywasfound 2、网上的方法都试遍了,发现还是无法找到解决方法。 最后的解决办法:将GET请求方法,改为POST就可以了。 ......
  • ecplise启动报错
    eclipse启动遇到java.lang.AssertionError:assertionfailed的问题!ENTRYorg.eclipse.e4.ui.workbench.swt422022-11-2208:41:25.150!MESSAGEProblemsoccurredwheninvokingcodefromplug-in:"org.eclipse.e4.ui.workbench.swt".!STACK0java.lang.AssertionEr......
  • 计网学习笔记五 wireless && mobile networks
    老师把无线网络用一节课一遍过了…感觉没能学透,便课后自己总结,看书,找资料补充,把无线网络大概摸了个七七八八。虽然不算精细,但还能看!内容包括WLAN总概,WiFi—WLAN的实现,802.11规定的帧结构,以及蜂窝网络。强烈推荐一本书:《802.11WirelessNetworks:TheDefinitiveGuide》,2ndEd......
  • ADS "is an instance of undefined model"仿真报错
    前情提要我遇到的问题如下所示:原理图上直接拖了工艺库里的东西来搭,之后报错如下。解决办法我内网外网搜了很多,都说要加一个include的控件。但是他们举的例子几乎都是同一个,而且我用的这个工艺库也没有很明显的带有include字样的元件,而我的工艺是老师发给我的,不是网上可以下载......
  • 每日总结--2023/3/29(解决sevlet报错问题和数据库中文编码错误)
    今日完成:昨天的残留问题,查询了很多资料,也没能完全解决。首先是tomcat版本问题,重新下载并且部署了tomcat10版本的内容,解决了sevlet代码报错的问题。但是连接数据库仍然是不成功,报500错误,检查了mysql数据库,发现数据库正常(除中文变为?的bug)。连接数据库暂时仍不成功,但是成功解决......