我正在尝试在弹性搜索中平均一个字段,
"aggs": {
"avg_timedifference": {
"avg": {
"script" : "doc['@timestamp'].value"
}
}
这有效,
映射在哪里,
{
"_index" : "justchill",
"_type" : "doc",
"_id" : "cRP1bWEB6Z3gZHtPaXv1",
"_score" : 1.0,
"_source" : {
"port" : 80,
"bing.sss-ccc.tc.DOWNSTREAM_dropped.bong" : 33.0,
"@timestamp" : "2018-02-07T01:50:55.000Z",
"message" : "ccc.dna-ccc.tc.DOWNSTREAM_dropped.kkk 33 1517968255",
"@version" : "1",
"host" : "localhost"
}
},
{
"_index" : "justchill",
"_type" : "doc",
"_id" : "cRP1bWEB6Z3gZHtPaXv1",
"_score" : 1.0,
"_source" : {
"port" : 80,
"bong.sss-ccc.tc.DOWNSTREAM_dropped.bing" : 33.0,
"@timestamp" : "2018-02-07T01:50:55.000Z",
"message" : "ccc.dna-ccc.tc.DOWNSTREAM_dropped.kkk 33 1517968255",
"@version" : "1",
"host" : "localhost"
}
},
我想要做的是访问这里临时命名为 bing..bong 和 bong ..bing 的字段。该字段是动态映射的,有什么方法可以访问相同的吗?