# How to index properties of GeoJson in geo\_shape type

**URL:** <https://discuss.elastic.co/t/how-to-index-properties-of-geojson-in-geo-shape-type/96322>\
**Category:** Elasticsearch\
**Created:** [August 8, 2017, 6:31pm UTC](https://discuss.elastic.co/t/how-to-index-properties-of-geojson-in-geo-shape-type/96322 "2017-08-08T18:31:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rohit\_Nigam](https://avatars.discourse-cdn.com/v4/letter/r/cdc98d/32.png) [@Rohit\_Nigam](https://discuss.elastic.co/u/Rohit_Nigam)\
**Post date:** [August 8, 2017, 6:31pm UTC](https://discuss.elastic.co/t/how-to-index-properties-of-geojson-in-geo-shape-type/96322/1 "2017-08-08T18:31:41Z")

</div>

Hi  
I would like to index the properties in the GeoJson object as a part of geo\_shape type in elastic search. Any ideas how to do that. The GeoJson supports the object of type  
[http://geojson.org/](http://geojson.org/)

{  
"type": "Feature",  
"geometry": {  
"type": "Point",  
"coordinates": [125.6, 10.1]  
},  
"properties": {  
"name": "Dinagat Islands"  
}  
}  
while the elastic search supports :--  
"location": {  
"type": "geo\_shape",  
"tree": "quadtree",  
"precision": "1m"  
}

how do i index the "properties" object given above which has "name" in it as a part of the geo\_shape type?

Rohit

---

<div class="post-metadata">

**Author:** ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)\
**Post date:** [August 11, 2017, 6:11am UTC](https://discuss.elastic.co/t/how-to-index-properties-of-geojson-in-geo-shape-type/96322/2 "2017-08-11T06:11:10Z")

</div>

Hey @Rohit_Nigam you can [create a mapping for a geojson `Feature`](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html) to map

1. the `geometry` field as a `geo_shape` type
2. the `type` as a `keyword` type
3. the `properties` as an `object` type

---

<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:** [September 8, 2017, 6:11am UTC](https://discuss.elastic.co/t/how-to-index-properties-of-geojson-in-geo-shape-type/96322/3 "2017-09-08T06:11:32Z")

</div>

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