spring-boot-starter-data-elasticsearch版本导致的问题及解决方案

ps:如只需要解决方案,则直接翻至底部

我这里springboot使用版本为2.3.0.RELEASE,使用的elasticsearch版本为6.2.2,在进行saveAll操作时,出现如下异常信息,不单是save操作,其他操作均出现一样。

save异常信息:
org.elasticsearch.ElasticsearchStatusException: Elasticsearch exception [type=action_request_validation_exception, reason=Validation Failed: 1: type is missing;2: type is missing;3: type is missing;4: type is missing;5: type is missing;6: type is missing;7: type is missing;8: type is missing;9: type is missing;10: type is missing;11: type is missing;]

@Document注解
查看save的对象,上的@Document注解,发现type属性在spring-data-elasticsearch4.0以及以后被废弃,跟着说明文档进去,在elasticsearch7.0以及以后API的版本不在支持types

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值