Closed
Description
ES responses include the key_as_string
values when aggregating results. This is a human readable version of the field-value.
For example:
- booleans: ES aggregates results under '0' and '1' for booleans, but maps these to 'true' and 'false' under the
key_as_string
property. - dates: cf. https://www.elastic.co/guide/en/elasticsearch/reference/2.3/search-aggregations-bucket-datehistogram-aggregation.html#_keys
Kibana currently does not use the key_as_string
value at all.
Kibana has a separate formatting layer: field formatters
. These can be applied to one or more field-types.
- Are we unnecessarily duplicating functionality?
- What is the added value of field formatters when ES already returns pre-formatted strings?
- Should Kibana use
key_as_string
as the default way of showing a field-value? Or in the absence of a field formatter? - Is the
key_as_string
-value sufficient to eliminate simple field-formatters? See also Add Boolean field formatter #7935, which introduces a Boolean field formatter so Kibana pretty-prints booleans for legends and axis.