Hi, I am trying to get the latest messages and then sort these messages based on one of their fields(i.e. name in this case). I tried the following. It ran but the sorting didn't happen. Any idea of what I am doing wrong? Thanks in advance for any help.
select tmp.name, tmp.overallStatus from (
SELECT name, overallStatus FROM "sites"
ORDER BY "@timestamp" DESC
LIMIT 80) tmp
ORDER BY tmp.name asc
What you want to achieve is to have a 1st level ordering, limit the results and at a 2nd level re-order those limited results by another sorting column, which is semantically different than flattening the order by (order by 1, 2 means order by 1 and for equalities on 1 order those entries by 2).
To sum up, what you want to do is not currently supported by ES-SQL.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.