Kibana/Elasticsearch version:
7.12.1
Describe the bug:
Steps to reproduce:
- Create an index pattern including two patterns :
test*,abcd*
- Create a
Categorization anomaly detection job that will trigger an alert
- In Anomaly explorer, click on
View examples :

This opens a link like this :
https://localhost:5601/app/discover#/?_g=(refreshInterval:(display:Off,pause:!t,value:0),time:(from:'2021-05-06T02:00:00.000Z',mode:absolute,to:'2021-05-06T02:15:00.000Z'))&_a=(filters%3A!()%2Cindex%3A'test*'%2Cquery%3A(language%3Akuery%2Cquery%3A'category%3A%22catC%22%20and%20category%3A%22TeamC%22%20and%20category%3A%22CompanyC%22'))
So it opens discover with index pattern test*, 2 scenarios :
1- If the index pattern with this name exist, it will have half the data so it might not give any example that triggered the anomaly
2- If the index pattern with this name does not exist, it will open discover on the default index pattern, for example an unrelated index with different fields/data:

Expected behavior:
This should open Discover with index pattern test*,abcd*
Kibana/Elasticsearch version:
7.12.1
Describe the bug:
Steps to reproduce:
test*,abcd*Categorizationanomaly detection job that will trigger an alertView examples:This opens a link like this :
So it opens discover with index pattern
test*, 2 scenarios :1- If the index pattern with this name exist, it will have half the data so it might not give any example that triggered the anomaly
2- If the index pattern with this name does not exist, it will open discover on the default index pattern, for example an unrelated index with different fields/data:
Expected behavior:
This should open Discover with index pattern
test*,abcd*