-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Ability to set a custom field name in Discovery and Saved Searches #15246
Comments
In discover,can I edit the column names? In the version kibana 6.2.3? |
Since saved searches work a bit like visuazliations, I think it'd be reasonable to have a "custom column name" feature for saved searches ala the Custom Label feature in the visualizations. It looks like today a saved search columns is just a list of field names:
It should be preeetty easy app-logic-wise to extend that to support:
Other places it's been suggested to use a Data Table to workaround this lacking functionality, but that only works for numeric values, at least I can't figure out how to add a term as a data table value? |
+1 need exactly this |
+1 |
1 similar comment
+1 |
@Bargs, I've looked into this and I think I can easily change the columns list to be similar to what @algefaen suggested. The only issue I have is that I don't know where to let the user specify the column name. One idea is to put it in the field name list on the left hand side. The field name list currently shows the list of selected fields at the top and when you click on it, it expands to show some summary data. I could put a text box there and then users can enter the custom label there. It would only affect the saved search, similar to how visualizations allow you to create custom labels. |
My initial reaction is that field aliases should probably be a Kibana wide feature, and management of those aliases should go in the index pattern management screen. We could even lean on the field alias support coming to Elasticsearch (we'll need to support ES field aliases anyway). My reasoning is that, for consistency's sake, a user would want to use the same name for a field throughout Kibana. Using different names for the same field in different saved searches would be confusing and opaque to consumers of those saves searches. I think visualizations are a little bit different because the custom labels are generally applied to aggregations of fields and not the fields themselves, so it's possible to give them more meaningful or shorter names. If we had global field aliases they would work across visualize and discover and there would be no more need to set custom labels on visualizations in the most simple cases. Are there use cases where global field aliases would not solve your problem? |
@Bargs, I would rather not lean on the field alias support since I think the list of valid characters for an ES field alias is limited and I'd like to be able to use all characters (especially non-ascii characters). If you allow custom labels on visualizations (which I think you should even if you use the global aliases), I think you should also allow custom labels on saved searches. You can have the situation where you know that your saved search is going to be in a smaller space in the dashboard and so you want the name smaller than normal, or it will never be in a dashboard so you can ensure the name is as descriptive as possible. |
It will be very helpful to have this ability! |
That's a good point, I can see how adjusting the column names based on the context the search will be viewed in could be useful. Putting the alias editor in the sidebar would work, but I wonder if it should be more connected to the doc table itself. Being able to edit the column name inline would feel more natural. On the other hand, we'd probably still want the name to update in the sidebar as well, so that might be kind of weird and unexpected for a change in the doc table to update the sidebar. What do you think @elastic/kibana-design ? |
I agree with @Bargs that filed aliases should be global, in many cases, we have multiple users using Kibana and I see this capability as an admins capability where they can change the field name to a more friendly name, so the right place to me will be in the index pattern page. I think changing the column name based on the search context is a different use case than what I often hear from users around friendlier names for fields
This is an interesting feedback, we can ask the Elasticsearch team to support it (cc: @jtibshirani ) |
I'm under the impression that this issue was solely about giving "custom labels" to the discover table and saved searches. These are non-global labels that are just needed for that specific search for various reasons. A global field alias is fine as well since that allows you to give a more user friendly name across the board, but I believe another issue is covering that. |
@trevan I don't mean to bring this thread too off-topic, but I wanted to clarify what you meant by 'I think the list of valid characters for an ES field alias is limited'. It should be possible to specify non-ascii characters in field names (including names for field aliases) -- did you have a particular example in mind that elasticsearch wouldn't support? |
@jtibshirani, I couldn't find the list of allowed characters in field names when I responded to @Bargs so I made an assumption that there is a limited set. But for labels on a saved search, I could see my users wanting to use strings in their preferred language and punctuation (especially quotation marks and periods). If ES supports the full utf8 spectrum for field aliases and field names, then that is something I didn't know before. |
Got it, thanks! I've actually found it difficult to track down the exact set of allowed characters as well :) I'll take another look and may loop back with an elasticsearch issue depending on the outcome. |
Has anything progressed here? For the sake of moving things along without adding to the UI for now, I'd suggest adding the suggestions by algafaen to the Management / Kibana / Objects / Saved Searches edit dialog for the saved object. |
Right now, you can edit the column names in a Data Table visualization and any other visualization by setting the Custom Label field to what you want. It would be good to have the option to do that in Discover and Saved Searches as well, where in order to rename a field you would have to change the field in the mapping and reindex, right now.
Maybe an extra option in the field editor in Management like "Display name" would be a good way of doing it, but this is open to discussion.
The text was updated successfully, but these errors were encountered: