# Need help with geo\_polygon filter

**URL:** <https://discuss.elastic.co/t/need-help-with-geo-polygon-filter/19588>\
**Category:** Elasticsearch\
**Created:** [September 3, 2014, 9:52am UTC](https://discuss.elastic.co/t/need-help-with-geo-polygon-filter/19588 "2014-09-03T09:52:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![clement\_tourriere](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/clement_tourriere/32/479_2.png) [@clement\_tourriere](https://discuss.elastic.co/u/clement_tourriere)\
**Post date:** [September 3, 2014, 9:52am UTC](https://discuss.elastic.co/t/need-help-with-geo-polygon-filter/19588/1 "2014-09-03T09:52:04Z")

</div>

Hi,

there is something that I don't fully understand about geo\_polygon filter.

Some points are not always retuned by query when filtering by a polygon. I  
think this is happening when points are near polygon bounds but I'm not  
sure.  
Though this is working if I use a geo\_bounding\_box query or a "bigger"  
polygon.

Moreover, if points are indexed as geo\_shape type and I use a geo\_shape  
filter, it's working with the same polygon used in polygon\_filter.

I write a little example in this gist :

> <https://gist.github.com/clement-tourriere/a05723be373d75dddf72>

I don't think the problem is related to this issue (  
[https://github.com/elasticsearch/elasticsearch/issues/5968](https://github.com/elasticsearch/elasticsearch/issues/5968)), in my example,  
polygon doesn't cross the date line (or I'm missing something).

Regards,  
Clément

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/73e55072-6ac9-4551-9f3b-9da81a5f8b5a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/73e55072-6ac9-4551-9f3b-9da81a5f8b5a%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:04am UTC](https://discuss.elastic.co/t/need-help-with-geo-polygon-filter/19588/2 "2017-07-06T01:04:41Z")

</div>


