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

[Discover] Add a warning and tooltip for _score column in the grid #167271

Open
Tracked by #194790
jughosta opened this issue Sep 26, 2023 · 12 comments
Open
Tracked by #194790

[Discover] Add a warning and tooltip for _score column in the grid #167271

jughosta opened this issue Sep 26, 2023 · 12 comments
Assignees
Labels
enhancement New value added to drive a business result Feature:Discover Discover Application good first issue low hanging fruit impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:small Small Level of Effort papercut Small "burr" in the product that we should fix. Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. usability

Comments

@jughosta
Copy link
Contributor

For the legacy view we used to have a tooltip which was explaining how to get _score values. Would be great to introduce it to the grid view too.

Screenshot 2023-09-26 at 14 55 10
@jughosta jughosta added Feature:Discover Discover Application usability loe:small Small Level of Effort Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. labels Sep 26, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@jughosta jughosta added the enhancement New value added to drive a business result label Sep 26, 2023
@jughosta jughosta changed the title [Discover] Add a tooltip for _score column in the grid [Discover] Add a warning and tooltip for _score column in the grid Sep 26, 2023
@kertal kertal added impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. good first issue low hanging fruit labels Sep 28, 2023
@shardulgawande27
Copy link

/attempt #167271

@shardulgawande27
Copy link

@jughosta @kertal could you explain step to get _score values.

@kertal
Copy link
Member

kertal commented Oct 2, 2023

you don't need the _score values, you need to display the warning when the column is named _score, and it's not sorted by _score

// If this is the _score column, and _score is not one of the columns inside the sort, show a
// warning that the _score will not be retrieved from Elasticsearch
const showScoreSortWarning = name === '_score' && !curColSort;

@davismcphee
Copy link
Contributor

@kertal should you comment refer to _score instead of _source?

@kertal
Copy link
Member

kertal commented Oct 4, 2023

@kertal exactly, it's _score not _source. edited, thx

@rbrtj
Copy link
Contributor

rbrtj commented Jan 20, 2025

Hey!
Should we disable the column token when a warning is displayed?
@kertal

Image

Also, do you see this as custom behavior for UnifiedDataTable or just an override coming from DiscoverGrid?

@kertal
Copy link
Member

kertal commented Jan 20, 2025

thx @rbrtj for you questions

@l-suarez will have a look from design side, to figure out about the columns token (which should just be used for the _score. We show it because without sorting by _score, no _score value is calculated and this is not very obvious to the user)

Also, do you see this as custom behavior for UnifiedDataTable or just an override coming from DiscoverGrid?

We discussed this and we're fine with adding this as a custom behavior to the UnifiedDataTable, but it just needs to bedisplayed if sorting is allowed, else it doesn't make sense.

@l-suarez
Copy link

@jughosta @kertal out of curiosity, would it make sense that we sort the column for the user if they want to display _score? asking them to sort by the column is an extra step if they really want to use the field.

@kertal
Copy link
Member

kertal commented Jan 22, 2025

yes, I think being more helpful to the user in this case makes sense, but this ain't a papercut then, it has more complex state manipulation, so I think as a first step adding a warning ... or an info is fine, and then: let's improve it 👍

@l-suarez
Copy link

Agree. Let's do this as a paper-cut, we don't need the token for _score, keeping the warning icon

@davismcphee
Copy link
Contributor

Sorting _score by default probably makes sense, but a user could still manually unsort it, so agreed that the warning would still be helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Discover Discover Application good first issue low hanging fruit impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:small Small Level of Effort papercut Small "burr" in the product that we should fix. Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. usability
Projects
None yet
Development

No branches or pull requests

8 participants