# Dynamic Template Mapping for Geo Point Field

**URL:** <https://discuss.elastic.co/t/dynamic-template-mapping-for-geo-point-field/67423>\
**Category:** Elasticsearch\
**Created:** [November 29, 2016, 2:02am UTC](https://discuss.elastic.co/t/dynamic-template-mapping-for-geo-point-field/67423 "2016-11-29T02:02:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![juminoz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/juminoz/32/13110_2.png) [@juminoz](https://discuss.elastic.co/u/juminoz)\
**Post date:** [November 29, 2016, 2:02am UTC](https://discuss.elastic.co/t/dynamic-template-mapping-for-geo-point-field/67423/1 "2016-11-29T02:02:03Z")

</div>

Is dynamic mapping for geo point still working in Elastic Search 2.x/5.x?

This is the template:

```
{
        "template": "*",
        "mappings": {
            "_default_": {
                "dynamic_templates": [
                    {
                        "geo_point_type": {
                            "match_mapping_type": "string",
                            "match": "t_gp_*",
                            "mapping": {
                                "type": "geo_point"
                            }
                        }
                    }
                ]
            }
        }
    }

```

This is the error I get when I query the field:

"reason": "failed to parse [geo\_bbox] query. field [t\_gp\_lat-long@en] is expected to be of type [geo\_point], but is of [string] type instead"

I seems to remember that I saw somewhere in the documentation that this doesn't work, but I thought that's only when there is no dynamic template at all.

Any idea?

---

<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:** [December 27, 2016, 2:02am UTC](https://discuss.elastic.co/t/dynamic-template-mapping-for-geo-point-field/67423/2 "2016-12-27T02:02:18Z")

</div>

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