I wanted to understand how numeric data types such as integer and long are indexed. I think it should get indexed like keywords, without any analysis. Is there any need or benefit to also mapping a numeric type with a 'keyword' type?
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.
@whatgeorgemade, its very helpful explanation! Thanks a bunch.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.