-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Description
We should add doc values support for geo points, probably via BinaryDocValues.
Similarly to #3993, the challenge is in the mappers, since the mapper needs to know all field values in order to be able to create the field instance (because there can be a single BinaryDocValues instance per document per field).
Another open question is about the encoding: storing two doubles (16 bytes) per point is probably wasteful, should we use instead a different encoding that would be more compact while keeping precision good enough? Since the range of possible values is fixed, I'm thinking that a fixed-size encoding that would map [-180,180] into [0, 2^bits_per_value] would be rather efficient. For example, if my math is correct, a bits_per_value of 24 (62.5% reduction) could give a precision of ~5m, a bits_per_value of 32 (50% reduction) would give a precision of ~20mm, and a bits_per_value of 40 (37.5% reduction) would give a precision << 1mm.