我刚打酱油去了,不好意思

ES如何获取搜索出来的值,放到List中

Elasticsearch | 作者 LFYFeight666 | 发布于2019年11月04日 | 阅读数:2267

{
byClass = {
"byClass": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 0,
"buckets": [{
"key": "0-0:0-0",
"doc_count": 40,
"extended_stats": {
"count": 40,
"min": 2.0, //最低分
"max": 149.0, //最高分
"avg": 82.15, //平均分
"sum": 3286.0, //总分
"sum_of_squares": 339740.0,
"variance": 1744.8774999999994,
"std_deviation": 41.77173087148771, //标准差
"std_deviation_bounds": {
"upper": 165.69346174297544,
"lower": -1.3934617429754184
}
},
"per": {
"values": {
"40.0": 23.5, //低分率
"60.0": 30.3, //及格率
"90.0": 52.5 //优秀率
}
}
}
}
各位大佬:
请问, 如何获取其中的值. 我想把这些值放入到对象中返回给前端. 用JavaApi实现
已邀请:

fantuan

赞同来自:

用es官方的Java High Level Rest Client呀。查询结果转成POJO了。
https://www.elastic.co/guide/e ... .html
匿名用户

匿名用户

赞同来自:

卧槽。

zqc0512 - andy zhou

赞同来自:

高级客户端封装了API的。

要回复问题请先登录注册