-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Closed
Copy link
Labels
Description
Elasticsearch version (bin/elasticsearch --version):
7.0.0-rc1
Plugins installed: []
none
JVM version (java -version):
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
OS version (uname -a if on a Unix-like system):
Darwin Alexs-MacBook-Pro-2.local 18.5.0 Darwin Kernel Version 18.5.0: Mon Mar 11 20:40:32 PDT 2019; root:xnu-4903.251.3~3/RELEASE_X86_64 x86_64
Description of the problem including expected versus actual behavior:
In Canvas I"m running the following query
SELECT source.geo.country_iso_code country, count(*) total
FROM "filebeat-*"
GROUP BY country
ORDER BY total descand getting
When I run the following query
SELECT source.geo.country_iso_code country, count(*) total
FROM "filebeat-*"
GROUP BY country
ORDER BY total desc
LIMIT 5I'd expect to get US, IT, FR, DE, MX but instead I get
Translate returns
{
"size" : 0,
"_source" : false,
"stored_fields" : "_none_",
"aggregations" : {
"groupby" : {
"composite" : {
"size" : 5,
"sources" : [
{
"164180" : {
"terms" : {
"field" : "source.geo.country_iso_code",
"missing_bucket" : true,
"order" : "asc"
}
}
}
]
}
}
}
}This seems to be a bug with LIMIT and ordering by an aggregation

