elastic / kibana

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

Inspector shows incorrect index pattern #187103

Open lukasolson opened 6 days ago

lukasolson commented 6 days ago

Describe the bug:

When using an index filter, the "Index Pattern" that shows up in the inspector is not always accurate.

Steps to reproduce:

  1. Open Discover
  2. In the KQL bar, filter for a specific _index without using wildcards (e.g. _index: logs-2024-06-27)
  3. Open the Inspect panel

Expected behavior:

It would show the "Index Pattern" as logs-2024-06-27. Instead, it shows logs-.

Screenshots (if relevant):

image

Any additional context:

Related: https://github.com/elastic/kibana/pull/136407

I believe this regex needs to be adjusted:

https://github.com/elastic/kibana/blob/6b778cb071fa8b0555f51bc7aa721e1947474b07/src/plugins/data/common/search/search_source/search_source.ts#L1211-L1230

elasticmachine commented 6 days ago

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