# Find all the geoshapes that insersects with a given latitude/longitude

**URL:** <https://discuss.elastic.co/t/find-all-the-geoshapes-that-insersects-with-a-given-latitude-longitude/17983>\
**Category:** Elasticsearch\
**Created:** [June 8, 2014, 7:42pm UTC](https://discuss.elastic.co/t/find-all-the-geoshapes-that-insersects-with-a-given-latitude-longitude/17983 "2014-06-08T19:42:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vidal\_Chriqui](https://avatars.discourse-cdn.com/v4/letter/v/f04885/32.png) [@Vidal\_Chriqui](https://discuss.elastic.co/u/Vidal_Chriqui)\
**Post date:** [June 8, 2014, 7:42pm UTC](https://discuss.elastic.co/t/find-all-the-geoshapes-that-insersects-with-a-given-latitude-longitude/17983/1 "2014-06-08T19:42:05Z")

</div>

Hi

My goal is to find for a given latitude/longitude all the indexed documents  
(circular geoshapes with specific radius for each) that contains this  
lat/lon.  
If necessary i'm ok to transform the circular zones with envelope, but this  
does not seem to be the issue.

I need help to find the way to write the search query.  
In this gist, you can find the document mappings, 3 sample docs et 2  
attempts to write the query, but, those queries do not return anything  
whereas it should (obviously the query is not the correct one).

> <https://gist.github.com/anonymous/3e6aa70bf8b31e8eb345>

Thanks for your help to write the correct query.

Best regards  
Vidal

--  
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/2ba3bd12-8f75-4584-9d89-a90fc8af0f53%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2ba3bd12-8f75-4584-9d89-a90fc8af0f53%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [June 16, 2014, 1:37pm UTC](https://discuss.elastic.co/t/find-all-the-geoshapes-that-insersects-with-a-given-latitude-longitude/17983/2 "2014-06-16T13:37:16Z")

</div>

Hey,

this looks like a problem, because you are using an \_id object, I filed an  
issue here: [Indexing: Using \_id as object doesnt work for future queries · Issue #6514 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/6514)  
You can just specify ids manually or make sure, that you \_id field is empty  
for now.

--Alex

On Sun, Jun 8, 2014 at 9:42 PM, Vidal Chriqui [vidal.chriqui@gmail.com](mailto:vidal.chriqui@gmail.com)  
wrote:

> Hi
> 
> My goal is to find for a given latitude/longitude all the indexed  
> documents (circular geoshapes with specific radius for each) that contains  
> this lat/lon.  
> If necessary i'm ok to transform the circular zones with envelope, but  
> this does not seem to be the issue.
> 
> I need help to find the way to write the search query.  
> In this gist, you can find the document mappings, 3 sample docs et 2  
> attempts to write the query, but, those queries do not return anything  
> whereas it should (obviously the query is not the correct one).
> 
> [gist:3e6aa70bf8b31e8eb345 · GitHub](https://gist.github.com/anonymous/3e6aa70bf8b31e8eb345)
> 
> Thanks for your help to write the correct query.
> 
> Best regards  
> Vidal
> 
> --  
> 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/2ba3bd12-8f75-4584-9d89-a90fc8af0f53%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2ba3bd12-8f75-4584-9d89-a90fc8af0f53%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/2ba3bd12-8f75-4584-9d89-a90fc8af0f53%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/2ba3bd12-8f75-4584-9d89-a90fc8af0f53%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAGCwEM9niKkctJhwi%3D8aYrEYfBya%3D-e%3D4\_ShMvfpzSPJwnzL%2Bg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGCwEM9niKkctJhwi%3D8aYrEYfBya%3D-e%3D4_ShMvfpzSPJwnzL%2Bg%40mail.gmail.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:22am UTC](https://discuss.elastic.co/t/find-all-the-geoshapes-that-insersects-with-a-given-latitude-longitude/17983/3 "2017-07-06T01:22:06Z")

</div>


