Unmapped_type for _geo_distance sorting

I'm trying to sort by geo_point, but I'm getting the following error:

"reason":{"type":"query_shard_exception","reason":"failed to find geo_point field [city.location]"

The docs say:

geo distance sorting does not support configurable missing values: the distance will always be considered equal to Infinity when a document does not have values for the field that is used for distance computation.

My understanding of the latter is that the prior should not be possible. My question is then twofold:

  1. Does "distance will always be considered equal to Infinity when a document does not have values for the field" not apply when a field is missing entirely?
  2. How then do I set something like unmapped_type on geo_point to allow for missing fields?

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