首页 > 其他分享 >es(Elasticsearch)查询报错: Set fielddata=true on [level] in order to load fielddata in memory by uninver

es(Elasticsearch)查询报错: Set fielddata=true on [level] in order to load fielddata in memory by uninver

时间:2023-04-03 10:37:50浏览次数:44  
标签:load exception fielddata level Elasticsearch memory 报错

 

Invocation of init method failed; nested exception is ElasticsearchStatusException[Elasticsearch exception [type=search_phase_execution_exception, reason=all shards failed]]; nested: ElasticsearchException[Elasticsearch exception [type=illegal_argument_exception, reason=Fielddata is disabled on text fields by default. Set fielddata=true on [level] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.]]; nested: ElasticsearchException[Elasticsearch exception [type=illegal_argument_exception, reason=Fielddata is disabled on text fields by default. Set fielddata=true on [level] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.]];

 

简单解决办法,代码查询的时候改为

 searchSourceBuilder.sort("level.keyword", SortOrder.DESC);

加一个

.keyword

 

标签:load,exception,fielddata,level,Elasticsearch,memory,报错
From: https://www.cnblogs.com/pxblog/p/17282304.html

相关文章

  • vscode项目中加入eslint配置不生效,控制台有报错,但是代码没有标红
    项目中配置下载了eslint各种配置,vscode配置文件settings.json中配置了,但是就是代码没有标红,不能自动修复。最终发现问题所在在vscode的配置文件settings.json中eslint.options有个这个参数,如果没有注释就注释掉,有的话就放开,进行一个切换就可以了这是我整个settings.json里的......
  • Elasticsearch(es)查询报错:Result window is too large, from + size must be less th
     {"error":{"root_cause":[{"type":"query_phase_execution_exception","reason":"Resultwindowistoolarge,from+sizemustbelessthanorequalto:[10000]butwas[20000].Seethescrollapiforam......
  • 前端里那些你不知道的事儿之 【window.onload】
    作者:京东科技孙凯一、前言相信很多前端开发者在做项目时同时也都做过页面性能优化,这不单是前端的必备职业技能,也是考验一个前端基础是否扎实的考点,而性能指标也通常是每一个开发者的绩效之一。尤其马上接近年关,页面白屏时间是否过长、首屏加载速度是否达标、动画是否能流畅运行,诸......
  • 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......
  • nested exception is java.lang.IllegalStateException: org.apache.tomcat.util.http
    一、问题背景利用springboot上传大文件二、报错截图如下2023-04-0216:04:18,681ERROR[http-nio-63050-exec-6][GlobalExceptionHandler.java:58]-系统异常:Maximumuploadsizeexceeded;nestedexceptionisjava.lang.IllegalStateException:org.apache.tomcat.util.h......
  • 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就可以了。 ......
  • An Error Ocurred - Error loading password's vault file ---Uninstall MySQL for Ex
    还是在2020年疫情封控开始前后的连续几个月天天重温Delphi、MSSQL、也偶尔折腾一下MySQL,最近2年都没再折腾,昨天2023.4.1,打开Excel是提示此此问题:卸载掉MySQLforExcel之后,再次打开Office2016就Ok了,奇怪为什么会出现这个问题呢 //点击showdetails之后如下:     ......