-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Add esTypes property to index pattern field #35251
Conversation
Pinging @elastic/kibana-app |
This approach makes sense to me. It was surprising to me that this information was missing when working on the new editor. I assume this needs some kind of testing or migration plan to be ready, but I'm not super familiar with the requirements there. |
💔 Build Failed |
💔 Build Failed |
Fixed and added tests and updated unit test fixtures and sample data. However I did not touch the functional test fixtures. These can't be easily updated automatically afaik. We'd need to load up each data set, refresh the index pattern and save it to the archive in order to get accurate type information from the field_caps API. That's a lot of up front work when none of the current functional tests require this information, and they could be updated one by one as needed. This seems to be the approach taken when similar updates have been made, for example Unless reviewers strongly disagree with the reasoning above, I'm pretty much done with the code once CI passes and this is ready for review. |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💚 Build Succeeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. One concern I have is that developers will start using this assuming it's available on all index patterns and not just ones you've refreshed. Not sure if a comment in the code will help or if we plan to actually do some sort of migration like Wylie suggested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
I thought about that back when I was adding multi field info to the index pattern. Nathan thought it would be a bad idea to automatically refresh index patterns and I agreed. At least for now I think we should build features with the assumption that this info might not be available. The typescript definition marks this property as optional so as long as someone is using TS they'll be forced to handle the situation where this property is undefined. I'll add a comment to the TS definition explaining why it could be undefined. |
… huge fields test
💚 Build Succeeded |
Adds an array property to the Field object containing all of the types the field is mapped as across ES indices.
Summary
Adds an array property to the Field object containing all of the types the field is mapped as across ES indices.
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.- [ ] This was checked for cross-browser compatibility, including a check against IE11- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support- [ ] Documentation was added for features that require explanation or tutorials- [ ] This was checked for keyboard-only and screenreader accessibilityFor maintainers
- [ ] This was checked for breaking API changes and was labeled appropriately- [ ] This includes a feature addition or change that requires a release note and was labeled appropriately