# Indexed\_shape and subquery

**URL:** <https://discuss.elastic.co/t/indexed-shape-and-subquery/17178>\
**Category:** Elasticsearch\
**Created:** [April 24, 2014, 3:41pm UTC](https://discuss.elastic.co/t/indexed-shape-and-subquery/17178 "2014-04-24T15:41:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alain\_Perry](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@Alain\_Perry](https://discuss.elastic.co/u/Alain_Perry)\
**Post date:** [April 24, 2014, 3:41pm UTC](https://discuss.elastic.co/t/indexed-shape-and-subquery/17178/1 "2014-04-24T15:41:19Z")

</div>

Hello list,

I'm wondering how to achieve something that I'm gessing is not a rare feat,  
but I can't fathom how to manage it.

Basically, what I would like to do is find the equivalent of the  
index\_shape variant of the geo\_shape filter, but using more than one  
indexed geo\_shapes.

Let's say I have an indexed called "regions", with a "tag" field and a  
geo\_shape field.

I also have a number of POIs indexed as geo\_shapes. I want to retrieve  
every POI inside regions tagged with a specific term. Appart from first  
querying on the region index and then using an "or" filter, which will make  
for a huge request, is there a way to ask ES for that result at the moment ?

Thanks for your time.

--  
Alain

--  
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/ee66dd69-1bdc-402f-9121-4751c2f1dc8b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ee66dd69-1bdc-402f-9121-4751c2f1dc8b%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:** [April 26, 2014, 12:27am UTC](https://discuss.elastic.co/t/indexed-shape-and-subquery/17178/2 "2014-04-26T00:27:01Z")

</div>

Hey,

correct, you need to specify a number of geo\_shape filters inside of an or  
filter. Maybe it is easier to simply tag the POI entities as well?

--Alex

--  
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/CAGCwEM8nJuOXc1MwL\_PbTWD%2B72jDYRzHM9Tc80dEuxabdRc5rA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGCwEM8nJuOXc1MwL_PbTWD%2B72jDYRzHM9Tc80dEuxabdRc5rA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Alain\_Perry](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@Alain\_Perry](https://discuss.elastic.co/u/Alain_Perry)\
**Post date:** [April 29, 2014, 1:19pm UTC](https://discuss.elastic.co/t/indexed-shape-and-subquery/17178/3 "2014-04-29T13:19:49Z")

</div>

It would have been if I didn't have a variety of shapes in which to check  
for the presence of POIs, with some of these shapes changing on a regular  
basis...

I was looking at the structure of the geo\_shape filter and wondering how  
hard it would be to let the user enter a subquery whose return geo\_shapes  
would be merged in a shapecollection ? Should I create a "wishlist" entry  
on github ?

Thanks for your help.

--  
Alain Perry

2014-04-26 2:27 GMT+02:00 Alexander Reelsen [alr@spinscale.de](mailto:alr@spinscale.de):

> Hey,
> 
> correct, you need to specify a number of geo\_shape filters inside of an or  
> filter. Maybe it is easier to simply tag the POI entities as well?
> 
> --Alex
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/15CtXlCHft4/unsubscribe](https://groups.google.com/d/topic/elasticsearch/15CtXlCHft4/unsubscribe).  
> To unsubscribe from this group and all its topics, 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/CAGCwEM8nJuOXc1MwL\_PbTWD%2B72jDYRzHM9Tc80dEuxabdRc5rA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGCwEM8nJuOXc1MwL_PbTWD%2B72jDYRzHM9Tc80dEuxabdRc5rA%40mail.gmail.com)[https://groups.google.com/d/msgid/elasticsearch/CAGCwEM8nJuOXc1MwL\_PbTWD%2B72jDYRzHM9Tc80dEuxabdRc5rA%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAGCwEM8nJuOXc1MwL_PbTWD%2B72jDYRzHM9Tc80dEuxabdRc5rA%40mail.gmail.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/CAHJSR%3D%3D8%3DRWf%2BoByX4z4JG4QoxJ5WwQAfjoM3o8n%3DbO9%2Ba5Lkg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHJSR%3D%3D8%3DRWf%2BoByX4z4JG4QoxJ5WwQAfjoM3o8n%3DbO9%2Ba5Lkg%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:32am UTC](https://discuss.elastic.co/t/indexed-shape-and-subquery/17178/4 "2017-07-06T01:32:46Z")

</div>


