我希望弹性搜索中脚本字段中的两个值相乘,如图所示。怎么做?
我正在使用以下聚合代码
{
"aggs": {
"mention": {
"terms": {
"size": 20,
"field": "username"
},
"aggs": {
"mention_hits": {
"top_hits": {
"sort": [
{
"published_date": {
"order": "desc"
}
}
],
"_source": {
"include": [
"klout"
]
},
"size": 1
}
},
"user_ranking": {
"max": {
"script": " 123 "
}
}
}
}
}
}