Skip to content
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

Make default sort order on discover page configurable #5164

Closed
panovodv opened this issue Oct 21, 2015 · 6 comments
Closed

Make default sort order on discover page configurable #5164

panovodv opened this issue Oct 21, 2015 · 6 comments

Comments

@panovodv
Copy link

Developers in my company are used to tailing and grepping logs, which means that older records come first. They became increasingly frustrated after roll out of ELK stack, because it doesn't follow they can't follow their habitual pattern. As I see there are two issues right now,
1). After user changes sort order on Discover page, it is not persisted when search is done again (may be #2716)
2). There's now way I can set default search order for kibana (and adding {"order": "asc" } to sort:options doesn't help!)

I guess, this ticket would be for tracking latter issue, as former is already tracked (correct me if I'm wrong).

@rashidkpc
Copy link
Contributor

This is already possible. Simply change the sort order and save the search. Any time you re-load that saved search the sort will be as you specified it. #2716 is specific the the dashboard.

@panovodv
Copy link
Author

I was thinking about default order, that is, before you change it and save it

@benb111
Copy link

benb111 commented Dec 22, 2015

+1 I would like to be able to change the default sort order.

@rechena
Copy link

rechena commented Jul 7, 2016

+1 to reopen, since theres no easy way for developers to change the sort

@Matty9191
Copy link

Another +1. This would be super useful.

@Bargs Bargs reopened this Aug 24, 2017
@Bargs
Copy link
Contributor

Bargs commented Aug 24, 2017

Seems like a reasonable request. I wonder if we should just provide a way to set a default saved search though. It would kill two birds with one stone #7238

@Bargs Bargs added the PR sent label Aug 25, 2017
Bargs added a commit to Bargs/kibana that referenced this issue Aug 28, 2017
I went back and forth on a lot of different solutions for this.

Initially I thought it would make sense to just allow users to set a
default saved search in Discover. There were some problems with that
approach though. It would change the default workflow in Discover.
Instead of starting with an unsaved search, users would be editing a
saved search by default. I could see this leading to a lot of
unintentional changes to the default. The settings from the default
saved search also wouldn't carry over to new searches, which I think
would be desirable most of the time.

I also considered adding a new advanced setting for specifying a default
sort field/direction. This kind of setting would make more sense at the
index pattern level though. One field may not be valid across all index
patterns.

So I ended up going with the simplest solution. It solves the issue
identified by the author of the linked issue and nothing more. If a sort
order is specified in the existing sort:options advanced setting, we'll
use that direction when sorting on the index pattern's timestamp field
by default.

Fixes elastic#5164
Bargs added a commit that referenced this issue Aug 29, 2017
* Check sort:options for Discover default sort order

I went back and forth on a lot of different solutions for this.

Initially I thought it would make sense to just allow users to set a
default saved search in Discover. There were some problems with that
approach though. It would change the default workflow in Discover.
Instead of starting with an unsaved search, users would be editing a
saved search by default. I could see this leading to a lot of
unintentional changes to the default. The settings from the default
saved search also wouldn't carry over to new searches, which I think
would be desirable most of the time.

I also considered adding a new advanced setting for specifying a default
sort field/direction. This kind of setting would make more sense at the
index pattern level though. One field may not be valid across all index
patterns.

So I ended up going with the simplest solution. It solves the issue
identified by the author of the linked issue and nothing more. If a sort
order is specified in the existing sort:options advanced setting, we'll
use that direction when sorting on the index pattern's timestamp field
by default.

Fixes #5164

* Create a new advanced setting instead of re-using sort:options

* Just pass a default order
Bargs added a commit to Bargs/kibana that referenced this issue Aug 29, 2017
* Check sort:options for Discover default sort order

I went back and forth on a lot of different solutions for this.

Initially I thought it would make sense to just allow users to set a
default saved search in Discover. There were some problems with that
approach though. It would change the default workflow in Discover.
Instead of starting with an unsaved search, users would be editing a
saved search by default. I could see this leading to a lot of
unintentional changes to the default. The settings from the default
saved search also wouldn't carry over to new searches, which I think
would be desirable most of the time.

I also considered adding a new advanced setting for specifying a default
sort field/direction. This kind of setting would make more sense at the
index pattern level though. One field may not be valid across all index
patterns.

So I ended up going with the simplest solution. It solves the issue
identified by the author of the linked issue and nothing more. If a sort
order is specified in the existing sort:options advanced setting, we'll
use that direction when sorting on the index pattern's timestamp field
by default.

Fixes elastic#5164

* Create a new advanced setting instead of re-using sort:options

* Just pass a default order
Bargs added a commit to Bargs/kibana that referenced this issue Aug 29, 2017
* Check sort:options for Discover default sort order

I went back and forth on a lot of different solutions for this.

Initially I thought it would make sense to just allow users to set a
default saved search in Discover. There were some problems with that
approach though. It would change the default workflow in Discover.
Instead of starting with an unsaved search, users would be editing a
saved search by default. I could see this leading to a lot of
unintentional changes to the default. The settings from the default
saved search also wouldn't carry over to new searches, which I think
would be desirable most of the time.

I also considered adding a new advanced setting for specifying a default
sort field/direction. This kind of setting would make more sense at the
index pattern level though. One field may not be valid across all index
patterns.

So I ended up going with the simplest solution. It solves the issue
identified by the author of the linked issue and nothing more. If a sort
order is specified in the existing sort:options advanced setting, we'll
use that direction when sorting on the index pattern's timestamp field
by default.

Fixes elastic#5164

* Create a new advanced setting instead of re-using sort:options

* Just pass a default order
Bargs added a commit that referenced this issue Aug 29, 2017
* Check sort:options for Discover default sort order

I went back and forth on a lot of different solutions for this.

Initially I thought it would make sense to just allow users to set a
default saved search in Discover. There were some problems with that
approach though. It would change the default workflow in Discover.
Instead of starting with an unsaved search, users would be editing a
saved search by default. I could see this leading to a lot of
unintentional changes to the default. The settings from the default
saved search also wouldn't carry over to new searches, which I think
would be desirable most of the time.

I also considered adding a new advanced setting for specifying a default
sort field/direction. This kind of setting would make more sense at the
index pattern level though. One field may not be valid across all index
patterns.

So I ended up going with the simplest solution. It solves the issue
identified by the author of the linked issue and nothing more. If a sort
order is specified in the existing sort:options advanced setting, we'll
use that direction when sorting on the index pattern's timestamp field
by default.

Fixes #5164

* Create a new advanced setting instead of re-using sort:options

* Just pass a default order
Bargs added a commit that referenced this issue Aug 29, 2017
* Check sort:options for Discover default sort order

I went back and forth on a lot of different solutions for this.

Initially I thought it would make sense to just allow users to set a
default saved search in Discover. There were some problems with that
approach though. It would change the default workflow in Discover.
Instead of starting with an unsaved search, users would be editing a
saved search by default. I could see this leading to a lot of
unintentional changes to the default. The settings from the default
saved search also wouldn't carry over to new searches, which I think
would be desirable most of the time.

I also considered adding a new advanced setting for specifying a default
sort field/direction. This kind of setting would make more sense at the
index pattern level though. One field may not be valid across all index
patterns.

So I ended up going with the simplest solution. It solves the issue
identified by the author of the linked issue and nothing more. If a sort
order is specified in the existing sort:options advanced setting, we'll
use that direction when sorting on the index pattern's timestamp field
by default.

Fixes #5164

* Create a new advanced setting instead of re-using sort:options

* Just pass a default order
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants