Skip to content

[6.x] Check sort:options for Discover default sort order (#13708)#13763

Merged
Bargs merged 1 commit intoelastic:6.xfrom
Bargs:backport/13708/6.x
Aug 29, 2017
Merged

[6.x] Check sort:options for Discover default sort order (#13708)#13763
Bargs merged 1 commit intoelastic:6.xfrom
Bargs:backport/13708/6.x

Conversation

@Bargs
Copy link
Copy Markdown
Contributor

@Bargs Bargs commented Aug 29, 2017

backport #13708

* 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 Bargs added the backport This PR is a backport of another PR label Aug 29, 2017
@Bargs Bargs merged commit b942987 into elastic:6.x Aug 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant