我在弹性搜索中创建了查询以获得两个以上具有相同名称和哈希的文件。查询是 -
{
"size": 0,
"aggregations": {
"server": {
"terms": {
"field": "owner"
},
"aggregations": {
"md5hash": {
"terms": {
"field": "md5hash"
},
"aggregations": {
"sFileName": {
"terms": {
"field": "sFileName",
"min_doc_count": 2
},
"aggregations": {
"sourcesum": {
"sum": {
"field": "sourceSize"
}
}
}
}
}
}
}
}
}
}
现在我想从 sourcesum 中减去 doc.["sourceSize"]。我怎样才能在上面的查询中做到这一点。