-
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
Elasticsearch version:
SNAPSHOT-8.0.0 via Docker
Description of the problem including expected versus actual behavior:
If i specify order in the terms aggs, it returns less results.
With order specified
GET heartbeat-8*/_search
{
"size": 0,
"query": {
"bool": {
"filter": [
{
"terms": {
"monitor.id": [
"SimpleHTTP",
"my-monitor-inline"
]
}
}
]
}
},
"aggs": {
"monitor": {
"terms": {
"field": "monitor.id",
"size": 2,
"order": {
"_key": "asc"
}
}
}
}
}
Result will be
"hits" : {
"total" : {
"value" : 10000,
"relation" : "gte"
},
"max_score" : null,
"hits" : [ ]
},
"aggregations" : {
"monitor" : {
"doc_count_error_upper_bound" : 0,
"sum_other_doc_count" : 17102,
"buckets" : [
{
"key" : "SimpleHTTP",
"doc_count" : 132
}
]
}
}
With no order specified query
"aggs": {
"monitor": {
"terms": {
"field": "monitor.id",
"size": 2
}
}
}
and result
"aggregations" : {
"monitor" : {
"doc_count_error_upper_bound" : 0,
"sum_other_doc_count" : 0,
"buckets" : [
{
"key" : "my-monitor-inline",
"doc_count" : 17105
},
{
"key" : "SimpleHTTP",
"doc_count" : 135
}
]
}
}
Data is standard heartbeat monitors data.
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)