How to add a Field to Range Aggregation

Hello,
How to add a Field to Range Aggregation?

Thank you

In order to use a field there it has to mapped as number in elasticsearch. Can you share what the mappings look like for the field we want?

Jon,

What specific Mapping information is needed?

The “Blue” Field is a Number

Thanks,

-Mark

Ah :slight_smile: Kibana thinks its a string for some reason.

We can check the elasticsearch mappings directly with

GET <index_name>/_mapping

in dev tools.

If it says keyword or text there we'll have to reindex the data with a numeric type. If it is a numeric type we can click the refresh icon on the index page in Kibana.

In dev tools, does "Type" need to be set to "Float", or perhaps some other Type?

Yup, one of these: https://www.elastic.co/guide/en/elasticsearch/reference/current/number.html.

If it has decimals, float or double, if not long or integer.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.