# Search from indexed geo-shape which are intersect with i given's latitude&longitude , but return no hit

**URL:** https://discuss.elastic.co/t/search-from-indexed-geo-shape-which-are-intersect-with-i-givens-latitude-longitude-but-return-no-hit/109877
**Category:** Elasticsearch
**Created:** [December 1, 2017, 4:14am UTC](https://discuss.elastic.co/t/search-from-indexed-geo-shape-which-are-intersect-with-i-givens-latitude-longitude-but-return-no-hit/109877 "2017-12-01T04:14:24Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![fangchunliu](https://avatars.discourse-cdn.com/v4/letter/f/898d66/32.png) [@fangchunliu](https://discuss.elastic.co/u/fangchunliu)
#### Post date: [December 1, 2017, 4:14am UTC](https://discuss.elastic.co/t/search-from-indexed-geo-shape-which-are-intersect-with-i-givens-latitude-longitude-but-return-no-hit/109877/1 "2017-12-01T04:14:25Z")

</div>

1.this is my index  
{  
"settings":{  
"index":{  
"number\_of\_shards":9,  
"number\_of\_replicas":3  
}  
},

"mappings": {  
"wm\_aor\_area": {  
"properties": {  
"aor\_id": {  
"type": "integer"  
},  
"wm\_aor\_polygon": {  
"type": "geo\_shape"  
}  
}  
}  
}  
}

2.insert a polygon into elasticesearch2.3  
curl -XPUT [test.es.data.sankuai.com:9200/infra/wm\_aor\_area/4](http://test.es.data.sankuai.com:9200/infra/wm_aor_area/4) -d '{  
"wm\_aor\_polygon":{  
"type": "polygon",  
"coordinates": [[[17.811456, -179.296880],[28.459032, -179.296880],[28.459032, -61.347656],[17.811456, -61.347656],[17.811456, -179.296880]]]  
},  
"aor\_id":4  
}'

3.search from indexed polygon

curl -XGET [test.es.data.sankuai.com:9200/infra/wm\_aor\_area/\_search](http://test.es.data.sankuai.com:9200/infra/wm_aor_area/_search) -d '{  
"query":{  
"bool": {  
"must": {  
"match\_all": {}  
},  
"filter": {  
"geo\_shape": {  
"wm\_aor\_polygon": {  
"shape": {  
"type": "point",  
"coordinates" : [102.725419,25.086736]  
},  
"relation":"intersects"  
}  
}  
}  
}  
}  
}'

4.return

{"took":1,"timed\_out":false,"\_shards":{"total":2,"successful":2,"failed":0},"hits":{"total":0,"max\_score":null,"hits":[]}}

i make true this point is intersect with the polygon,but i get no hit.

elasticesearch2.3

thanks for any reply!

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [December 1, 2017, 7:53am UTC](https://discuss.elastic.co/t/search-from-indexed-geo-shape-which-are-intersect-with-i-givens-latitude-longitude-but-return-no-hit/109877/2 "2017-12-01T07:53:14Z")

</div>

It does not look to me as if the points are intersecting at all. If putting this into [geojson.io](http://geojson.io), one shape is a strip at the antarctic, where as the point is in China.

---

<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 29, 2017, 7:54am UTC](https://discuss.elastic.co/t/search-from-indexed-geo-shape-which-are-intersect-with-i-givens-latitude-longitude-but-return-no-hit/109877/3 "2017-12-29T07:54:18Z")

</div>

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