# Geo searching part of intro webinar is now broken

**URL:** <https://discuss.elastic.co/t/geo-searching-part-of-intro-webinar-is-now-broken/145964>\
**Category:** Elasticsearch\
**Created:** [August 24, 2018, 6:36pm UTC](https://discuss.elastic.co/t/geo-searching-part-of-intro-webinar-is-now-broken/145964 "2018-08-24T18:36:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tombusby](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tombusby/32/34815_2.png) [@tombusby](https://discuss.elastic.co/u/tombusby)\
**Post date:** [August 24, 2018, 6:36pm UTC](https://discuss.elastic.co/t/geo-searching-part-of-intro-webinar-is-now-broken/145964/1 "2018-08-24T18:36:51Z")

</div>

In the introductory webinar at [https://www.elastic.co/webinars/getting-started-elasticsearch?storm=start-page&iesrc=ctr](https://www.elastic.co/webinars/getting-started-elasticsearch?storm=start-page&iesrc=ctr), the part where he explains how to do geo based search no longer works.

(The commands he uses are [here](https://www.elastic.co/assets/blt395810ab50bd150b/6.3_es_commands.txt), looping back to redo the bulk add after creating the mappings manually)

You get the following error both before and after you have specified the mappings:

```
{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "failed to find mapper for [business_location] for geo distance based sort"
      }
    ],
    "type": "search_phase_execution_exception",
    "reason": "all shards failed",
    "phase": "query",
    "grouped": true,
    "failed_shards": [
      {
        "shard": 0,
        "index": "inspections",
        "node": "Agm7P2MYRa2vU7EEAkc6dg",
        "reason": {
          "type": "illegal_argument_exception",
          "reason": "failed to find mapper for [business_location] for geo distance based sort"
        }
      }
    ],
    "caused_by": {
      "type": "illegal_argument_exception",
      "reason": "failed to find mapper for [business_location] for geo distance based sort",
      "caused_by": {
        "type": "illegal_argument_exception",
        "reason": "failed to find mapper for [business_location] for geo distance based sort"
      }
    }
  },
  "status": 400
}
```

---

<div class="post-metadata">

**Author:** ![jasonz](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@jasonz](https://discuss.elastic.co/u/jasonz)\
**Post date:** [August 31, 2018, 2:55pm UTC](https://discuss.elastic.co/t/geo-searching-part-of-intro-webinar-is-now-broken/145964/2 "2018-08-31T14:55:41Z")

</div>

Hello, thanks for bringing this up! There is definitely an error in the command file (a slightly newer version was used in the webinar), the correct command is below (notice the "coordinates" field is used instead of the "business\_location" field" for the sort:

```
GET /inspections/_doc/_search
{
  "query": {
    "match": { "business_name": "soup"}
  },
  "sort": [
    {
      "_geo_distance": {
        "coordinates": {
          "lat": 37.800175,
          "lon": -122.409081
        },
        "order": "asc",
        "unit": "km",
        "distance_type": "plane"
      }
    }
    ]
}

```

I will work on updating the commands file that you linked to.

Thanks for reporting this!

---

<div class="post-metadata">

**Author:** ![tombusby](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tombusby/32/34815_2.png) [@tombusby](https://discuss.elastic.co/u/tombusby)\
**Post date:** [September 11, 2018, 11:03am UTC](https://discuss.elastic.co/t/geo-searching-part-of-intro-webinar-is-now-broken/145964/3 "2018-09-11T11:03:30Z")

</div>

Ah, I didn't notice that, thanks, I'll redo that section.

---

<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:** [October 9, 2018, 11:03am UTC](https://discuss.elastic.co/t/geo-searching-part-of-intro-webinar-is-now-broken/145964/4 "2018-10-09T11:03:48Z")

</div>

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