-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Analytics/AggregationsAggregationsAggregations>bugTeam:AnalyticsMeta label for analytical engine team (ESQL/Aggs/Geo)Meta label for analytical engine team (ESQL/Aggs/Geo)
Description
Versions affected: 7.15 and up
I'm seeing some odd results with the rate agg on documents that have a custom _doc_count and wondering if it's a bug, similar to #74617.
Reproduce problem
PUT rate-bug
POST rate-bug/_doc
{
"_doc_count": 10,
"@timestamp": "2021-09-14T22:33:37.477Z"
}
GET rate-bug/_search
{
"size": 0,
"aggs": {
"timeseries": {
"date_histogram": {
"field": "@timestamp",
"fixed_interval": "60s"
},
"aggs": {
"throughput": {
"rate": {
"unit": "minute"
}
}
}
}
}
}
Response
The search request will return:
{
"aggregations" : {
"timeseries" : {
"buckets" : [
{
"key_as_string" : "2021-09-14T22:33:00.000Z",
"key" : 1631658780000,
"doc_count" : 10,
"throughput" : {
"value" : 1.0
}
}
]
}
}
}Expectation
I'd expect that a bucket for 1 minute with 10 documents should have a rate of 10.
Actual
Rate is 1.0
Metadata
Metadata
Assignees
Labels
:Analytics/AggregationsAggregationsAggregations>bugTeam:AnalyticsMeta label for analytical engine team (ESQL/Aggs/Geo)Meta label for analytical engine team (ESQL/Aggs/Geo)