_Louw
(Mia Louw Håkonsen)
October 4, 2019, 9:22am
1
I am making a horisontal bar chart, and I only need the top 10 results of my data set.
My code is as follows:
SELECT role_, COUNT(role_) as role_count FROM "*canvas" GROUP BY role_
ORDER BY role_count DESC
If I preview, it orders the output perfectly:
But when I add LIMIT 10 on my essql statement, it chooses 10 entries from the whole, and not the first 10:
I can't see any system in this, and using TOP 10 after SELECT gave an error.
Can someone please tell me what is going on with LIMIT?
I think you are hitting this bug: https://github.com/elastic/elasticsearch/issues/40984 .
What ES version are you testing this on?
_Louw
(Mia Louw Håkonsen)
October 7, 2019, 7:10am
3
I am using ES 6.8.
It sure looks like that issue - but I guess the solution has not been backported correctly thenif I'm still experiencing the bug?
@_Louw can you be a bit more precise on the version? The 6.8 branch has 4 releases.
_Louw
(Mia Louw Håkonsen)
October 7, 2019, 8:56am
5
Ah, this I did not know
This is my version info:
"version" : {
"number" : "6.8.0",
"build_flavor" : "default",
"build_type" : "tar",
"build_date" : "2019-05-15T20:06:13.172855Z",
"build_snapshot" : false,
"lucene_version" : "7.7.0",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
}
@_Louw sorry for the delay, got the chance to test 6.8.0 now and I realized this is a slightly different bug that was fixed in 6.8.1: https://github.com/elastic/elasticsearch/issues/42851 with https://github.com/elastic/elasticsearch/pull/43154 .
Any chance you could test your query on 6.8.1 and see if it's still present? Thanks.
Again, sorry for the delay and the initial (wrong) assessment of the issue.
_Louw
(Mia Louw Håkonsen)
October 21, 2019, 1:13pm
7
Yes, I got it tested on 6.8.3, and it works there - thank you!
system
(system)
Closed
November 18, 2019, 1:13pm
8
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.