elasticsearch 报错: No value specified for terms query

这篇具有很好参考价值的文章主要介绍了elasticsearch 报错: No value specified for terms query。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

java调用es查询数据,提示错误:.No value specified for terms query

{
	"error": {
		"root_cause": [{
			"type": "parsing_exception",
			"reason": "No value specified for terms query",
			"line": 1,
			"col": 8597
		}],
		"type": "parsing_exception",
		"reason": "No value specified for terms query",
		"line": 1,
		"col": 8597
	},
	"status": 400
}

报错原因就是: 构造termsQuery查询条件的时候,比如:下边构造了一个null进去,就会报错。文章来源地址https://www.toymoban.com/news/detail-545769.html

QueryBuilders.termsQuery("name",  null)

到了这里,关于elasticsearch 报错: No value specified for terms query的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包赞助服务器费用

相关文章

  • 解决docker run报错:Error response from daemon: No command specified.

    解决docker run报错:Error response from daemon: No command specified.

    将docker镜像export/import之后,对新的镜像执行docker run时报错: docker: Error response from daemon: No command specified. 方案1: 查看容器的command: 在docker run命令上增加sh -c command: 方案2: 改用save/load命令替代export/import

    2024年04月26日
    浏览(14)
  • 创建docker容器报错:Error response from daemon: No command specified

    创建docker容器报错:Error response from daemon: No command specified

    No command specified 意为 没有指定命令 背景 由于环境原因从A环境中导出容器使用命令 拓展延申下: docker save docker save 保存的是镜像(image),docker export保存的是容器(container); docker load 用来载入镜像包,必须是一个分层文件系统,必须是是save的包;docker docker import docker im

    2024年02月10日
    浏览(18)
  • VIVADO 无法找到观测核 WARNING: [Xicom 50-38] xicom: No CseXsdb register file specified for CseXsdb slave ty

    VIVADO 无法找到观测核 WARNING: [Xicom 50-38] xicom: No CseXsdb register file specified for CseXsdb slave ty

    出现上面的问题一般是由于观测核的时钟没有导致的,具体错误如下图,但是经过确定时钟是有的,没办法只能一点一点的把代码注释发现,小程序又是可以观测到ila观测核的,也就是说基本排除硬件问题 通过一点点的定位发现,造成上面的问题是由于: 本工程我是在其他

    2024年02月11日
    浏览(10)
  • git 出现 There is no tracking information for the current branch. Please specify which branch you want

    git 出现 There is no tracking information for the current branch. Please specify which branch you want

    问题分析:当前pull对象没有远程分支的跟踪信息,简单地来说就是你创建的这个分支没有和远程仓库中的其他分支或者master建立联系,所以导致当前分支无法进行pull操作; 解决方案: git branch --set-upstream-to=origin/remote_name local_name 注解: remote_name : 远程分支名 // 这里是你创

    2024年02月05日
    浏览(17)
  • 解决报错 Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource c

    解决报错 Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource c

    在初次完成项目的构建后,启动项目时出错,提示信息“ Failed to configure a DataSource: ‘url’ attribute is not specified and no embedded datasource could be configured. ” ,这个异常很好理解,直接翻译成中文,一看便知了 “ 配置数据源失败:没有指定’url’属性,也不能配置嵌入式数据源。

    2024年02月08日
    浏览(10)
  • 【已解决】SpringBoot 启动报错:Failed to configure a DataSource: ‘url‘ attribute is not specified and no emb

    【已解决】SpringBoot 启动报错:Failed to configure a DataSource: ‘url‘ attribute is not specified and no emb

    下面是解决方法,快速搞定。 初始化创建的 SpringBoot ,什么都没改怎么就报错了? 方案1 如果项目不需要数据库相关信息就排除此类的autoconfig 在 @SpringBootApplication 注解上加上 exclude ,解除自动加载DataSourceAutoConfiguration。 springboot启动类加上这个启动以后就可以正常运行。完

    2024年02月03日
    浏览(33)
  • MySQL 报错 incorrect datetime value ‘0000-00-00 00:00:00‘ for column

    使用navicat导入数据时报错: MySQL 报错 incorrect datetime value ‘0000-00-00 00:00:00’ for column 这是因为当前的MySQL不支持datetime为0的情况。 MySQL报incorrect datetime value ‘0000-00-00 00:00:00’ for column错误原因,是由于在MySQL5.7版本以上,默认设置SQL_Mode模式,在模式里有NO_ZERO_DATE,NO_ZERO_IN_

    2024年02月12日
    浏览(10)
  • 前端页面报错(Cannot use ‘in‘ operator to search for ‘value‘ in undefined)

    前端页面报错(Cannot use ‘in‘ operator to search for ‘value‘ in undefined)

    问题示例:Cannot use \\\'in\\\' operator to search for \\\'username\\\' in {\\\"uid\\\":1,\\\"username\\\":\\\"admin\\\",\\\"password\\\":\\\"$2a$10$2zYH..Q3317nAJyQshN/iu9z.hzARVTblk3If42mWQMCNZIhFWaxm\\\",\\\"gender\\\":\\\"1\\\",\\\"image\\\":\\\"/\\\",\\\"telephone\\\":\\\"15039465258\\\",\\\"balance\\\":null,\\\"email\\\":\\\"\\\",\\\"isDeleted\\\":0,\\\"gmtCreate\\\":\\\"2022-12-13T01:23:54.000+0000\\\",\\\"gmtModified\\\":\\\"2022-12-13T01:24:01.000+0000\\\",\\\"code\\\":null

    2024年02月12日
    浏览(18)
  • docker 报错 error: invalid character ‘\x00‘ looking for beginning of value

    docker 报错 error: invalid character ‘\x00‘ looking for beginning of value

    执行docker build的时候报错:error: invalid character ‘x00’ looking for beginning of value。 环境: Docker version 20.10.17, build 100c701 windows docker desktop 4.10.1 WSL2 解决办法:https://github.com/docker/for-win/issues/12561 导致报错的原因是 meta.json 损坏,被写入了零值。 https://docs.docker.com/desktop/release-no

    2024年02月15日
    浏览(11)
  • Spring Boot 升级 3.2 报错 Invalid value type for attribute ‘factoryBeanObjectType‘: java.lang.String

    Spring Boot 升级 3.2 报错 Invalid value type for attribute ‘factoryBeanObjectType‘: java.lang.String

    🚀 作者主页: 有来技术 🔥 开源项目: youlai-mall 🍃 vue3-element-admin 🍃 youlai-boot 🌺 仓库主页: Gitee 💫 Github 💫 GitCode 💖 欢迎点赞 👍 收藏 ⭐留言 📝 如有错误敬请纠正! youlai-boot 升级 Spring Boot 3.2 版本项目启动报错: 报错截图如下: mybatis-spring 官方 ISSUE: https://githu

    2024年02月03日
    浏览(12)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包