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

[Filter manager] Stop loading index patterns via saved object, use service instead #91036

Closed
wylieconlon opened this issue Feb 10, 2021 · 4 comments
Assignees
Labels
Feature:Data Views Data Views code and UI - index patterns before 8.0 Feature:Filters 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

Comments

@wylieconlon
Copy link
Contributor

This is a bug in the value suggestions endpoint of the filter manager, where we are using this line of code to load the index pattern:

const indexPattern = await findIndexPatternById(context.core.savedObjects.client, index);

The bug manifests in the following way:

  1. Create a test index with a multi-mapped field, which is the default for any text. So for example:
PUT test-index/_doc/1
{
  "value": "My text value is multi-mapped"
}
  1. Create an index pattern for the above
  2. Go to Discover and search for value.keyword in the filter manager. Nothing will be suggested because it fails to load the index pattern field cache.

I think the only way to truly test this issue is to remove the field cache from all of the functional test archives. For example, I only ran into this problem because I removed the field cache from test/functional/fixtures/es_archiver/discover/data.json

To test this functionally, grep for discover filter editor

@wylieconlon wylieconlon added bug Fixes for quality problems that affect the customer experience Feature:Filters Feature:Data Views Data Views code and UI - index patterns before 8.0 Team:AppServices labels Feb 10, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

@lizozom
Copy link
Contributor

lizozom commented Feb 25, 2021

@wylieconlon should be resolved by #92861

@wylieconlon wylieconlon removed the bug Fixes for quality problems that affect the customer experience label Feb 25, 2021
@wylieconlon
Copy link
Contributor Author

I just tried to reproduce this on master, and it seems like newly created index patterns get saved using fields: "[]", and I wasn't able to reproduce the behavior I described as a bug. I was able to reproduce the bug in testing if I delete the fields property of the saved object entirely.

@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 2, 2021
@lukasolson
Copy link
Member

I'm unable to reproduce this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Data Views Data Views code and UI - index patterns before 8.0 Feature:Filters 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
Projects
None yet
Development

No branches or pull requests

5 participants