Avg Aggregation Histogram fields

Hi I'm working on Elasticsearch since 2015 . Today when I'm going through the documentation I found some interesting stuff i.e

PUT metrics_index/_doc/1
{
"network.name" : "net-1",
"latency_histo" : {
"values" : [0.1, 0.2, 0.3, 0.4, 0.5],
"counts" : [3, 7, 23, 12, 6]
}
}

PUT metrics_index/_doc/2
{
"network.name" : "net-2",
"latency_histo" : {
"values" : [0.1, 0.2, 0.3, 0.4, 0.5],
"counts" : [8, 17, 8, 7, 6]
}
}

POST /metrics_index/_search?size=0
{
"aggs": {
"avg_latency":
{ "avg": { "field": "latency_histo" }
}
}
}

So **avg_latency: null ** when I executed above queries.May I know the reason please?

Hey,

please try to provide a full reproduction when pasting snippets. I highly suspect, that you have not configured the latency_histo field to be a histogram data type, but I cannot be sure without a full snippet.

Thanks!

--Alex