-
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 support for field type alias
in index pattern
#28570
Comments
Pinging @elastic/kibana-app |
Pinging @elastic/kibana-app-arch |
I just filed elastic/elasticsearch#44298 (in the elasticsearch repo), which is a proposal to add field alias information to the response of |
We worked around this in Lens by combining information from the index pattern, field capabilities, and index mappings. It would be great to have this available in one API: #54064 |
We use this functionality to allow "duplicating" a field so we can apply different formatters to the original field versus the alias. So let's say I have a date field and i want to present the user links to different weather websites. I can alias the date to MyLink1, MyLink2, MyLink3 and have each one have a URL formatter that points to a different destination. |
Thank you for contributing to this issue, however, we are closing this issue due to inactivity as part of a backlog grooming effort. If you believe this feature/bug should still be considered, please reopen with a comment. |
Reopening as alias field is an existing type in Elasticsearch and as described initial Kibana should support it. |
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
I took a look at it, from Kibana side, we don't have information about alias fields, so we would need ES to support it, there are multiple issues for this, I think the most relevant was closed, and we could consider the to reopen it. Setting this to blocked for now |
It is suprising to me that Elasticsearch does not expose alias information. @felixbarny This might also be relevant in the case of passthrough fields. |
As far as I know, an alias field just looks like a regular field in field_caps. So if Passthrough fields are also part of the field_caps response (both the namespaced original fields and the top-level aliases). |
@kertal Can you share what Kibana does today on the above. Have not tested this again since I wrote the issue. |
@ruflin Sure! Like @felixbarny said
We just return what we get from
I'm not sure what's the impact of this enhancement, given that even if we get alias info, it's not a small task to implement a sort of field formatter inheritance. |
Elasticsearch has support for the datatype
alias
: https://www.elastic.co/guide/en/elasticsearch/reference/master/alias.html When using alias fields in an index and creating and index pattern Kibana assigns the exact same capabilities to the alias as the original field. This has the nice benefit that most things just work as expected as querying an alias behaves the same as querying the original field. The disadvantage is that Kibana does not have knowledge if a field is an alias or not.I'm proposing to introduces a type
alias
in the index pattern. If Kibana detects an alias field it looks up the capabilities likesearchable
,aggregatable
etc. from the original field and assigns the same behaviour.Today it's possible to assign 2 different formatters to the original and alias field which I think don't makes sense. If the formatter is changed on the original field, the alias field should automatically follow.
Having knowledge in Kibana that a field is of type
alias
should also make it possible to solve the problem around that Discovery does not show alias fields #21705. Kibana could fill in the alias fields with the original values if they exists on the fly for example.On the Beats side we generate the index pattern for Kibana. The current implementation means we have to do the linking of original to alias on the Beats side instead of leaving this to Kibana. Having a type alias would simplify the implementation on our end: elastic/beats#10013
The text was updated successfully, but these errors were encountered: