[Discover] Use tiebreaker sort in main discover view#32426
[Discover] Use tiebreaker sort in main discover view#32426wylieconlon wants to merge 1 commit intoelastic:masterfrom
Conversation
|
Pinging @elastic/kibana-app |
💚 Build Succeeded |
|
@chrisdavies Could you take a look at this when you get a chance? |
chrisdavies
left a comment
There was a problem hiding this comment.
LGTM. Just a review. Didn't pull down and test.
kertal
left a comment
There was a problem hiding this comment.
LGTM, when the conflicts are solved, this should be merged. tested locally with chrome
| .setField('sort', [ | ||
| getSort($state.sort, $scope.indexPattern), | ||
| { | ||
| [tiebreakerField]: defaultSortOrder, |
There was a problem hiding this comment.
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