0
回答
ElasticSearch返回json失败的问题?
华为云数据库免费试用   

如图,查询到multiSearchResponse结果之后返回json失败,请问该怎么解决呢?错误如下:

2018-01-13 17:44:27.041 WARN 49204 --- [nio-8080-exec-2] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved exception caused by Handler execution: org.springframework.http.converter.HttpMessageNotWritableException: Could not write content: No serializer found for class org.elasticsearch.common.text.Text and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: org.elasticsearch.action.search.MultiSearchResponse["responses"]->org.elasticsearch.action.search.MultiSearchResponse$Item["response"]->org.elasticsearch.action.search.SearchResponse["hits"]->org.elasticsearch.search.SearchHits["hits"]->org.elasticsearch.search.SearchHit["highlightFields"]->java.util.Collections$SingletonMap["attachment.content"]->org.elasticsearch.search.fetch.subphase.highlight.HighlightField["fragments"]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: No serializer found for class org.elasticsearch.common.text.Text and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: org.elasticsearch.action.search.MultiSearchResponse["responses"]->org.elasticsearch.action.search.MultiSearchResponse$Item["response"]->org.elasticsearch.action.search.SearchResponse["hits"]->org.elasticsearch.search.SearchHits["hits"]->org.elasticsearch.search.SearchHit["highlightFields"]->java.util.Collections$SingletonMap["attachment.content"]->org.elasticsearch.search.fetch.subphase.highlight.HighlightField["fragments"])

 

<无标签>
举报
哎码
发帖于8个月前 0回/246阅
顶部