Question about extended_stats aggregation


(Wim De Cock) #1

I am using Elasticsearch 2.3.3 and execute the following query:
POST ems-metrics-*/metric/_search?preference=_primary
{
"size": 100,
"query": {
"constant_score": {
"filter": {
"bool": {
"must": [
{
"match": {
"method": "consumerLag"
}
},
{
"range": {
"@timestamp": {
"gte": 1485244800000,
"lte": 1485244860000,
"format": "epoch_millis"
}
}
}
]
}
}
}
},
"aggs": {
"facts_by_interval": {
"date_histogram": {
"field": "@timestamp",
"interval": "minute"
},
"aggs": {
"occurences": {
"filters": {
"filters": {
"within_sla": {
"range": {
"value": {
"lte": 0
}
}
}
}
}
}
}
},
"stats_by_interval": {
"date_histogram": {
"field": "@timestamp",
"interval": "minute"
},
"aggs": {
"stats": {
"extended_stats": {
"field": "value"
}
}
}
}
}
}

which in return gives me the following search result
In which I think the extended stats contain errors: both the count and sum values within 'stats_by_interval' seem to be the exact double of what I expect them to be.

The 'facts_by_interval' aggregation however seems to be correct.

Any insight on this ?


(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.