What is the status of support for spaces in field names; specifically, from Kibana 7.11.2 onwards?
I've read conflicting information about this.
For example, here's a reply from an Elastic Team Member to the forum topic "Fields didn't show up":
I believe you may be seeing this issue due to the spaces in the field names. This isn't something that Elasticsearch supports. Can you try again with a log file where the spaces are converted to underscores instead? For example, instead of "new socket" the field name should be "new_socket".
I'd appreciate a definitive answer from the Elastic Team about the support for spaces in field names in (a) Kibana and (b) Elasticsearch. (It occurs to me that, if Elasticsearch supports spaces in field names, it doesn't necessarily follow that Kibana also supports spaces in field names.)
In each case: what are the practical issues involved? (For example, in Kibana, having to use a backslash on the Discover tab. And: do some panel/visualization editors in Kibana support spaces in fields, while others do not?)
In 7.12 it's possible to define a display name per field on the index pattern in Kibana. To my knowledge there shouldn't be any issues with using spaces in those display names, while keeping the underlying mapping close to the standard.
Queries and filters don't currently support a custom label and will use the original field name.
(Are custom labels supported by all panel/visualization editors? I'm guessing using Vega also means using the original field names, right?)
I'm helping to develop an application that forwards proprietary events and metrics data in JSON Lines format. The application could potentially offer the following choices of keys (field names):
Compact, cryptic names. All lowercase, no spaces, no special characters, not even underscores. Just a-z, 0-9. First character must be a letter (go ahead, ask ). e.g. indecpup
Longer, more human-readable names in snake case. As above, but longer, and with underscores. e.g. independent_enclave_cpu_percent
Display-friendly names. Mixed case, with spaces and special characters. e.g. Independent enclave CPU %
While I like the idea of the combination of:
Compact field names in the underlying data to conserve storage, mapped (via, in the case of Elastic, a Kibana index pattern) to
Longer, human-readable, display-friendly custom labels in a UI
the fact that there are still contexts in which users need to work directly with the underlying field names make the snake-case names more palatable.
Yeah, there are places in Kibana which don't use the display names (like vega).
I think snake case for the real fields in Elasticsearch plus display friendly names on the index pattern are a good compromise. In most cases regular users won't hit the places where display names are not shown.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.