-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Discover] Use tiebreaker sort in main discover view #32426
Conversation
Pinging @elastic/kibana-app |
💚 Build Succeeded |
@chrisdavies Could you take a look at this when you get a chance? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just a review. Didn't pull down and test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, when the conflicts are solved, this should be merged. tested locally with chrome
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the case with an empty tiebreaker is handled, conflicts are resolved, this should be merged
.setField('sort', [ | ||
getSort($state.sort, $scope.indexPattern), | ||
{ | ||
[tiebreakerField]: defaultSortOrder, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No tiebreakerField (I've set the field to empty in Advanced Configuration) leads to the following sort {"undefined":{"order":"desc","unmapped_type":"boolean"}
.
This isn't a bug, it was intentional. The tiebreaker was needed in the context app because it uses |
💔 Build Failed |
+1 for this. It would offer a pretty reasonable workaround for elastic/beats/7559 Use case; Using discover to analyze logs uploaded by filebeat which have millisecond collisions. Saved searches are a workaround but an extra-click barrier and less sharable. When using filebeat on indices using log.offset as a secondary sort field by default (or tiebreaker) seems to make a lot of sense. |
💔 Build Failed |
Summary
When timestamps are equal, the tiebreaker field should be used to provide a consistent sort order. This field was being used only in the Context view, but not in the Discover view.
To reproduce this issue, go to Advanced Settings > Discover and set a tiebreaker field like
offset,_doc
.Before:
After:
Closes #32221
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.- [ ] This was checked for cross-browser compatibility, including a check against IE11- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support- [ ] Documentation was added for features that require explanation or tutorials- [ ] This was checked for keyboard-only and screenreader accessibilityFor maintainers