elasticsearch搜索报错ElasticsearchException: failed to map source

灰太狼 2021-05-04 17:57 933阅读 0赞

1.报错情况,其实es已经有查询结果了,可是却报错了

  1. Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception
  2. [Request processing failed; nested exception is org.springframework.data.
  3. elasticsearch.ElasticsearchException: failed to map source
  4. [ {"id":1002,"title":"御街行·秋日怀旧","content":"纷纷坠叶飘香砌。
  5. 夜寂静,寒声碎。真珠帘卷玉楼空,天淡银河垂地。年年今夜,
  6. 月华如练,长是人千里。"}] to class Article] with root cause

2.解决方法
原因是确实无参构造函数,加上去就好了

  1. public Article() {
  2. }

发表评论

表情:
评论列表 (有 0 条评论,933人围观)

还没有评论,来说两句吧...

相关阅读