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

Creating index pattern with Saved Objects API before matching indices exists throws misleading/vague error. #57645

Closed
A-Hall opened this issue Feb 14, 2020 · 5 comments
Labels
bug Fixes for quality problems that affect the customer experience Feature:Data Views Data Views code and UI - index patterns before 8.0 impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. triage_needed

Comments

@A-Hall
Copy link
Member

A-Hall commented Feb 14, 2020

Kibana version: 7.6.0 and previous

Elasticsearch version: 7.6.0 and previous

Browser version: Chrome Version 79.0.3945.130 (Official Build) (64-bit)

Browser OS version: Windows 10

Original install method (e.g. download page, yum, from source, etc.): unpacked tarball

Describe the bug:

Vague/misleading error is thrown when index pattern created through the saved objects API matches no indices.

Steps to reproduce:

  1. Create index pattern with API.
curl -X POST "localhost:5601/api/saved_objects/index-pattern/my-pattern" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -u elastic:changeme -d'
{
  "attributes": {
    "title": "my-pattern-*"
  }
}
'
  1. Go to Discover tab and choose the newly created index pattern.

  2. Unable to fetch fields error is generated.

Expected behavior:

Error message says something like: No indices exist that match the index pattern.

Screenshots (if relevant):

image

image

image

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch (Team:AppArch)

@naveenspen14
Copy link

Hi Team,
In which version of kibana this fix will be available?.
We also facing same issue.

@ppisljar ppisljar added bug Fixes for quality problems that affect the customer experience Feature:Data Views Data Views code and UI - index patterns before 8.0 labels May 10, 2021
@exalate-issue-sync exalate-issue-sync bot added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort labels Jun 21, 2021
@mattkime
Copy link
Contributor

We now have an API specifically for creating index patterns - https://www.elastic.co/guide/en/kibana/master/index-patterns-api-create.html

@exalate-issue-sync exalate-issue-sync bot added loe:medium Medium Level of Effort and removed loe:small Small Level of Effort labels Jun 22, 2021
@exalate-issue-sync exalate-issue-sync bot added loe:small Small Level of Effort and removed loe:medium Medium Level of Effort labels Dec 21, 2021
@petrklapka petrklapka added Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. and removed Team:AppServicesSv labels Nov 28, 2022
@elasticmachine
Copy link
Contributor

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

@kertal
Copy link
Member

kertal commented May 30, 2023

Closing since as @mattkime pointed out there's a dedicated API for that, an we improved handling of data views without indices recently e.g. by #151788

@kertal kertal closed this as completed May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Data Views Data Views code and UI - index patterns before 8.0 impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. triage_needed
Projects
None yet
Development

No branches or pull requests

8 participants