How are numeric data types indexed?

There are lots of different mapping types you can use for numeric values, depending on the precision you need. Take a look at the documentation.

The numeric types are optimised for the type of searches you would typically run against a numeric type, like ranges. This means that there is some extra data stored along with the value.

If you're not going to be running range queries on the numeric fields and are just storing them for lookup, aggregation or ordering purposes, using a keyword mapping type is more efficient as the extra data isn't generated or stored.

1 Like