# Can't get geo\_point dynamic mapping to work

**URL:** <https://discuss.elastic.co/t/cant-get-geo-point-dynamic-mapping-to-work/3680>\
**Category:** Elasticsearch\
**Created:** [December 20, 2010, 4:47pm UTC](https://discuss.elastic.co/t/cant-get-geo-point-dynamic-mapping-to-work/3680 "2010-12-20T16:47:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![skaffman\_2](https://avatars.discourse-cdn.com/v4/letter/s/c4cdca/32.png) [@skaffman\_2](https://discuss.elastic.co/u/skaffman_2)\
**Post date:** [December 20, 2010, 4:47pm UTC](https://discuss.elastic.co/t/cant-get-geo-point-dynamic-mapping-to-work/3680/1 "2010-12-20T16:47:13Z")

</div>

Folks,

I've been using the information in the blog post at

> **[Geo Location and Search
	  	 | Elastic](https://www.elastic.co/blog/geo-location-and-search)**
>
> One of the coolest search technology combinations out there are the ability to combine geo and search. Queries such as give me all the restaurants that serves meat (\[insert your query here\]) within 20...

  
to have a play with the geo\_point type mapping, specifically how it  
hands dynamic recognition of geopoint data structures in the indexed  
documents.

For example, if I index the example document from the blog post, in a  
newly-created index:

{  
"pin" : {  
"location" : {  
"lat" : 40.12,  
"lon" : -71.34  
},  
"tag" : ["food", "family"],  
"text" : "my favorite family restaurant"  
}  
}

And then I query the index mapping via the REST API, I get the  
following back:

{  
"geotest" : {  
"pin" : {  
"properties" : {  
"text" : {  
"type" : "string"  
},  
"location" : {  
"properties" : {  
"lon" : {  
"type" : "double"  
},  
"lat" : {  
"type" : "double"  
}  
}  
},  
"tag" : {  
"type" : "string"  
}  
}  
}  
}  
}

My expectation here was for the mapping to have some mention of the  
geopoint "location" field, but there's no indication that  
ElasticSearch has recognised it for what it is.

Should I be able to see something there? If not, how can I verify that  
the geopoint field is being indexed?

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [December 20, 2010, 5:54pm UTC](https://discuss.elastic.co/t/cant-get-geo-point-dynamic-mapping-to-work/3680/2 "2010-12-20T17:54:53Z")

</div>

The geo point type is no longer dynamic, you have to explicitly define it.

On Mon, Dec 20, 2010 at 6:47 PM, skaffman [kenny@chasmcity.com](mailto:kenny@chasmcity.com) wrote:

> Folks,
> 
> I've been using the information in the blog post at  
> [Geo Location and Search | Elastic Blog](http://www.elasticsearch.com/blog/2010/08/16/geo_location_and_search.html)  
> to have a play with the geo\_point type mapping, specifically how it  
> hands dynamic recognition of geopoint data structures in the indexed  
> documents.
> 
> For example, if I index the example document from the blog post, in a  
> newly-created index:
> 
> {  
> "pin" : {  
> "location" : {  
> "lat" : 40.12,  
> "lon" : -71.34  
> },  
> "tag" : ["food", "family"],  
> "text" : "my favorite family restaurant"  
> }  
> }
> 
> And then I query the index mapping via the REST API, I get the  
> following back:
> 
> {  
> "geotest" : {  
> "pin" : {  
> "properties" : {  
> "text" : {  
> "type" : "string"  
> },  
> "location" : {  
> "properties" : {  
> "lon" : {  
> "type" : "double"  
> },  
> "lat" : {  
> "type" : "double"  
> }  
> }  
> },  
> "tag" : {  
> "type" : "string"  
> }  
> }  
> }  
> }  
> }
> 
> My expectation here was for the mapping to have some mention of the  
> geopoint "location" field, but there's no indication that  
> Elasticsearch has recognised it for what it is.
> 
> Should I be able to see something there? If not, how can I verify that  
> the geopoint field is being indexed?

---

<div class="post-metadata">

**Author:** ![skaffman\_2](https://avatars.discourse-cdn.com/v4/letter/s/c4cdca/32.png) [@skaffman\_2](https://discuss.elastic.co/u/skaffman_2)\
**Post date:** [December 20, 2010, 8:21pm UTC](https://discuss.elastic.co/t/cant-get-geo-point-dynamic-mapping-to-work/3680/3 "2010-12-20T20:21:54Z")

</div>

Ah, fair enough then, thanks.

You might want to update that blog entry, though, put up a warning  
sign or some such 🙂

On Dec 20, 5:54 pm, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:

> The geo point type is no longer dynamic, you have to explicitly define it.
> 
> On Mon, Dec 20, 2010 at 6:47 PM, skaffman [ke...@chasmcity.com](mailto:ke...@chasmcity.com) wrote:
> 
> > Folks,
> 
> > I've been using the information in the blog post at  
> > [http://www.elasticsearch.com/blog/2010/08/16/geo\_location\_and\_search](http://www.elasticsearch.com/blog/2010/08/16/geo_location_and_search)....  
> > to have a play with the geo\_point type mapping, specifically how it  
> > hands dynamic recognition of geopoint data structures in the indexed  
> > documents.
> 
> > For example, if I index the example document from the blog post, in a  
> > newly-created index:
> 
> > {  
> > "pin" : {  
> > "location" : {  
> > "lat" : 40.12,  
> > "lon" : -71.34  
> > },  
> > "tag" : ["food", "family"],  
> > "text" : "my favorite family restaurant"  
> > }  
> > }
> 
> > And then I query the index mapping via the REST API, I get the  
> > following back:
> 
> > {  
> > "geotest" : {  
> > "pin" : {  
> > "properties" : {  
> > "text" : {  
> > "type" : "string"  
> > },  
> > "location" : {  
> > "properties" : {  
> > "lon" : {  
> > "type" : "double"  
> > },  
> > "lat" : {  
> > "type" : "double"  
> > }  
> > }  
> > },  
> > "tag" : {  
> > "type" : "string"  
> > }  
> > }  
> > }  
> > }  
> > }
> 
> > My expectation here was for the mapping to have some mention of the  
> > geopoint "location" field, but there's no indication that  
> > Elasticsearch has recognised it for what it is.
> 
> > Should I be able to see something there? If not, how can I verify that  
> > the geopoint field is being indexed?

---

<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 6, 2017, 4:15am UTC](https://discuss.elastic.co/t/cant-get-geo-point-dynamic-mapping-to-work/3680/4 "2017-07-06T04:15:06Z")

</div>


