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

[ES|QL][Discover] Field list could also have the top values information #174984

Closed
Tracked by #172341
stratoula opened this issue Jan 17, 2024 · 2 comments · Fixed by #178433
Closed
Tracked by #172341

[ES|QL][Discover] Field list could also have the top values information #174984

stratoula opened this issue Jan 17, 2024 · 2 comments · Fixed by #178433
Assignees
Labels
enhancement New value added to drive a business result Feature:Discover Discover Application Feature:ES|QL ES|QL related features in Kibana impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:medium Medium Level of Effort Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Graph)

Comments

@stratoula
Copy link
Contributor

stratoula commented Jan 17, 2024

Describe the feature:

Currently in ES|QL mode of Discover we don't display any information when the user is clicking a field.

We could though use ES|QL to retrieve this information.

image

For example for the geo.dest field we could run the following query (for the top 10):

from kibana_sample_data_logs  | stats count() by geo.dest | sort geo.dest desc | limit 10

We can start with the top values for now. No filtering buttons for now.

This will require a different approach for ES|QL in the field list.

@stratoula stratoula added Feature:Discover Discover Application enhancement New value added to drive a business result impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Graph) Feature:ES|QL ES|QL related features in Kibana labels Jan 17, 2024
@elasticmachine
Copy link
Contributor

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

@jughosta
Copy link
Contributor

Nice idea!

@kertal kertal added the loe:medium Medium Level of Effort label Feb 1, 2024
jughosta added a commit that referenced this issue Mar 22, 2024
- Closes #174984

## Summary

This PR adds field stats for ES|QL mode in Discover. It will show "Top
values" for `keyword`, `ip`, `boolean`, `number`, `version` fields and
"Examples" for `text` and geo fields.

Also this PR extends text based column's meta with `esType` to make it
easier to differentiate between `keyword` and `text` columns when kibana
type for both is `string`. This change also has a UI improvement: `k`
token will be shown next to keyword fields in data grid column header
and in doc viewer instead of `t` token. And it will be possible to
filter by Keyword/Text types in the fields sidebar for ES|QL mode.

<img width="400" alt="Screenshot 2024-03-13 at 18 29 47"
src="https://github.com/elastic/kibana/assets/1415710/d88e85c3-329f-44fc-af54-3493dd9896d0">
<img width="400" alt="Screenshot 2024-03-13 at 18 30 01"
src="https://github.com/elastic/kibana/assets/1415710/b0808860-28db-472b-a0e3-37fc857bb40c">
<img width="400" alt="Screenshot 2024-03-13 at 18 30 19"
src="https://github.com/elastic/kibana/assets/1415710/b571199c-5956-472c-a0f7-c1b3d9bfe473">
<img width="400" alt="Screenshot 2024-03-13 at 18 30 13"
src="https://github.com/elastic/kibana/assets/1415710/a8e46b97-da38-4cbb-8980-fff214e09818">
<img width="400" alt="Screenshot 2024-03-13 at 18 30 06"
src="https://github.com/elastic/kibana/assets/1415710/8d1495ea-36d5-4203-9e86-90e7ea22cfe9">
<img width="400" alt="Screenshot 2024-03-13 at 18 31 50"
src="https://github.com/elastic/kibana/assets/1415710/b0660c57-aea8-4570-a72b-22df4c15dcc8">
<img width="400" alt="Screenshot 2024-03-13 at 18 30 50"
src="https://github.com/elastic/kibana/assets/1415710/9f81f7a8-7cba-44db-bbef-f1f1cb8e1093">

25x flaky test
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5470

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
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 Feature:ES|QL ES|QL related features in Kibana impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:medium Medium Level of Effort Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Graph)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants