# How to search in geo\_shape data?

**URL:** https://discuss.elastic.co/t/how-to-search-in-geo-shape-data/47770
**Category:** Elasticsearch
**Created:** [April 19, 2016, 9:46am UTC](https://discuss.elastic.co/t/how-to-search-in-geo-shape-data/47770 "2016-04-19T09:46:41Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Rajnikant](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rajnikant/32/6490_2.png) [@Rajnikant](https://discuss.elastic.co/u/Rajnikant)
#### Post date: [April 19, 2016, 9:46am UTC](https://discuss.elastic.co/t/how-to-search-in-geo-shape-data/47770/1 "2016-04-19T09:46:42Z")

</div>

I put geo\_shape data  
PUT test/landmark/dam\_square1  
{  
"name" : "Dam Square, Amsterdam",  
"location" : {  
"type" : "polygon",  
"coordinates" : [[  
[4.89218, 52.37356],  
[4.89205, 52.37276],  
[4.89301, 52.37274],  
[4.89392, 52.37250],  
[4.89431, 52.37287],  
[4.89331, 52.37346],  
[4.89305, 52.37326],  
[4.89218, 52.37356]  
]]  
}  
}

and then after i search using

POST test/landmark/\_search  
{  
"query":{  
"bool": {  
"must": {  
"match\_all": {}  
},  
"filter": {  
"geo\_shape": {  
"location": {  
"shape": {  
"type": "Polygon",  
"coordinates" : [[ 4.89392, 52.37250],  
[4.89431, 52.37287],  
[4.89331, 52.37346]]  
},  
"relation": "within"  
}  
}  
}  
}  
}  
}

and i got this type of error.  
{  
"error": {  
"root\_cause": [  
{  
"type": "query\_parsing\_exception",  
"reason": "No query registered for [geo\_shape]",  
"index": "test",  
"line": 8,  
"col": 17  
}  
],  
"type": "search\_phase\_execution\_exception",  
"reason": "all shards failed",  
"phase": "query",  
"grouped": true,  
"failed\_shards": [  
{  
"shard": 0,  
"index": "test",  
"node": "tYWj-d2wSlOtjN5xiGD3jg",  
"reason": {  
"type": "query\_parsing\_exception",  
"reason": "No query registered for [geo\_shape]",  
"index": "test",  
"line": 8,  
"col": 17  
}  
}  
]  
},  
"status": 400  
}

---

<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 5, 2017, 10:58pm UTC](https://discuss.elastic.co/t/how-to-search-in-geo-shape-data/47770/2 "2017-07-05T22:58:08Z")

</div>


