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:
Enable discover:searchFieldsFromSource and reload the page
Navigate to /discover page
Notice that it automatically adds _source to columns in the URL: &_a=(columns:!(_source)
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 showingDisplaying 1 of 39 fields. Add more from the Available fields list.
.Steps to reproduce:
discover:searchFieldsFromSource
and reload the page/discover
page_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