-
Notifications
You must be signed in to change notification settings - Fork 25.2k
[ES|QL] Sort by timestamp by default #108305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Pinging @elastic/es-analytical-engine (Team:Analytics) |
CC @tylerperk |
A few of us talked about this and decided that it'd be more surprising that good. The plan is to have a more IDE-like experience in kibana that can point users at expected patterns. Sort of like "if you write There's a bunch of competing visions here. One is that an ESQL query should, alone, describe as much of the behavior as possible without extra parameters. Because folks just post the ESQL query. At least, internally on slack, that's often all we'll get for debugging. And if we do a good job and people really start using ESQL then blogs and things will just have the text of the query. We won't get the url parameters, so having behavior depend on those is probably not a good idea. Another vision is that ESQL should work well for folks analyzing data in Kibana but also work well for folks building an application against Elasticsearch directly. Those are very different folks. We can expect the application builders to be quite familiar with SQL, for example, but lots of the kibana-direct users won't be. They just won't have had to use it in their normal job. The SQL-familiar people would be really surprised by a default sort. The kibana-direct folks are surprised we don't have it. The "suggest a sort" solution feels like it'd help everyone here - at least, everyone that uses kibana and can see it. Which seems good. |
@nik9000 - I'm not sure I personally agree with:
It seems like having the results come out unsorted, when even the UI of the of the results panel suggests that they should be sorted (via the sort arrow) that they are sorted). I just did a quick |
@stratoula it this looks like a UI bug with it thinking these are sorted but not. I know there's some tension between clicking the header in the UI and it sorting what's come back. that doesn't get pushed into the query and feels confusing too. But I think this picture just looks like a bug. Related, but different bug. |
Correct, we know about it. I just haven't found the time to tackle it |
thanks |
I am tackling this here elastic/kibana#187536 |
I am reopening this, to track the performance optimization of the sort @timestamp. I can't proceed with the above PR because we want to sort @timestamp and raise the limit 10 but it seems that is not performant. @nik9000 @bpintea if you want me to open a different issue for this let me know, but this is important for us |
I am closing this. ES is working on perfrormance atm so when they give us the green light we will continue our work at kibana |
Description
Although the user can set in the es|ql query the
| sort timestamp
command we would like in specific applications in Kibana to sort by timestamp by default.Kibana knows which timefiled is the one that user wants to sort by in Discover:
WHERE @timestamp >= ${earliest} AND @timestamp < ${latest}
see ES|QL: Named parameters #107029so we could send it to the _query api as a query param such as
?sortfield=<timeField>
or any other solution you feel is the best to achieve this. I remember also an idea of a ?kibana mode which could also make sense here.This issue is mostly for initializing the discussions.
The text was updated successfully, but these errors were encountered: