# Unmapped\_type for \_geo\_distance sorting

**URL:** <https://discuss.elastic.co/t/unmapped-type-for-geo-distance-sorting/135612>\
**Category:** Elasticsearch\
**Created:** [June 13, 2018, 12:41am UTC](https://discuss.elastic.co/t/unmapped-type-for-geo-distance-sorting/135612 "2018-06-13T00:41:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![elastic\_matt](https://avatars.discourse-cdn.com/v4/letter/e/6a8cbe/32.png) [@elastic\_matt](https://discuss.elastic.co/u/elastic_matt)\
**Post date:** [June 13, 2018, 12:41am UTC](https://discuss.elastic.co/t/unmapped-type-for-geo-distance-sorting/135612/1 "2018-06-13T00:41:45Z")

</div>

I'm trying to sort by geo\_point, but I'm getting the following error:

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

```

The [docs](https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-request-sort.html#search-request-sort) 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?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 11, 2018, 12:41am UTC](https://discuss.elastic.co/t/unmapped-type-for-geo-distance-sorting/135612/2 "2018-07-11T00:41:46Z")

</div>

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