elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.47k stars 8.04k forks source link

[Discover] No Field Statistics when discover:searchFieldsFromSource is enabled #187241

Open jughosta opened 2 days ago

jughosta commented 2 days ago

Description of the problem including expected versus actual behavior: When discover:searchFieldsFromSource is enabled, it adds _source as a column to the state. It results in Field Statistics showing no data and ES|QL showing Displaying 1 of 39 fields. Add more from the Available fields list..

Steps to reproduce:

  1. Enable discover:searchFieldsFromSource and reload the page
  2. Navigate to /discover page
  3. Notice that it automatically adds _source to columns in the URL: &_a=(columns:!(_source)

https://github.com/elastic/kibana/blob/808a89c6abe460a64ddf9233d7c58e28731cdf14/src/plugins/discover/public/application/main/state_management/utils/get_state_defaults.ts#L34

https://github.com/elastic/kibana/blob/6440075a8b2492821d0ee7b533b3fb9b4b5ce7a5/src/plugins/discover/public/utils/state_helpers.ts#L45

Screenshot 2024-07-01 at 13 22 10 Screenshot 2024-07-01 at 13 22 01
elasticmachine commented 2 days ago

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