"aggs": {
"top": {
"top_hits": {
"sort": [{
"@timestamp": {
"order": "desc"
}
}],
"size": 1,
"_source": {
"includes": ["jsonData.hisNum", "jsonData.depNum"]
}
}
},
"buttom": {
"top_hits": {
"size": 1,
"sort": [{
"@timestamp": {
"order": "asc"
}
}],
"_source": {
"includes": ["jsonData.hisNum", "jsonData.depNum"]
}
}
},
"sc": {
"bucket_script": {
"buckets_path": {
"a1": "top.jsonData.hisNum"
},
"script": "return a1"
}
}
}
我在sc中取buttom 和 top中的4个值参与计算,可是我取不出hit_top聚合中_source里面的数值
"top": {
"top_hits": {
"sort": [{
"@timestamp": {
"order": "desc"
}
}],
"size": 1,
"_source": {
"includes": ["jsonData.hisNum", "jsonData.depNum"]
}
}
},
"buttom": {
"top_hits": {
"size": 1,
"sort": [{
"@timestamp": {
"order": "asc"
}
}],
"_source": {
"includes": ["jsonData.hisNum", "jsonData.depNum"]
}
}
},
"sc": {
"bucket_script": {
"buckets_path": {
"a1": "top.jsonData.hisNum"
},
"script": "return a1"
}
}
}
我在sc中取buttom 和 top中的4个值参与计算,可是我取不出hit_top聚合中_source里面的数值
2 个回复
axxc
赞同来自:
cxycxy
赞同来自: