# Geo\_shape indexing and querying

**URL:** https://discuss.elastic.co/t/geo-shape-indexing-and-querying/66411
**Category:** Elasticsearch
**Created:** [November 17, 2016, 2:44pm UTC](https://discuss.elastic.co/t/geo-shape-indexing-and-querying/66411 "2016-11-17T14:44:11Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jamamas](https://avatars.discourse-cdn.com/v4/letter/j/ad7895/32.png) [@jamamas](https://discuss.elastic.co/u/jamamas)
#### Post date: [November 17, 2016, 2:44pm UTC](https://discuss.elastic.co/t/geo-shape-indexing-and-querying/66411/1 "2016-11-17T14:44:11Z")

</div>

Hi there. I have a collection of geo\_shapes pulled from a shape file that I have indexed into ES. I also have a large index of documents with geo\_points. I'm trying to run a query that returns all the documents that have a point within a geo\_shape, but keep getting zero results returned. What am I doing wrong or not understanding?

Here is the mapping for my geo\_shapes:  
{  
"locations":{  
"properties": {  
"type": "geo\_shape",  
"tree":"quadtree"  
}  
}  
}

and this is the mapping for the documents with geo\_points:  
{  
"docs":{  
"location":{  
"properties":{  
"coordinates":{  
"type":"geo\_point",  
"geohash":true  
}  
}  
}  
}  
}

the query I'm trying to run is:

{"query":  
"geo\_shape": {  
"geometry": {  
"indexed\_shape": {  
"id": "shape\_id",  
"type": "locations",  
"index": "index\_name",  
"path": "geometry"  
}  
}  
}

I'm pretty sure the mappings are correct, because I can do a query of a specific lat/long and successfully get back the geo\_shape it is in. I can also do a bounding box search of the documents with geo\_points and successfully get back a list of documents that match.

---

<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 15, 2016, 2:44pm UTC](https://discuss.elastic.co/t/geo-shape-indexing-and-querying/66411/2 "2016-12-15T14:44:26Z")

</div>

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