# ES subquery

**URL:** <https://discuss.elastic.co/t/es-subquery/143336>\
**Category:** Elasticsearch\
**Created:** [August 7, 2018, 1:17pm UTC](https://discuss.elastic.co/t/es-subquery/143336 "2018-08-07T13:17:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndrewLM](https://avatars.discourse-cdn.com/v4/letter/a/43a26b/32.png) [@AndrewLM](https://discuss.elastic.co/u/AndrewLM)\
**Post date:** [August 7, 2018, 1:17pm UTC](https://discuss.elastic.co/t/es-subquery/143336/1 "2018-08-07T13:17:47Z")

</div>

Hello, help pls to solve some task.  
I have some complex "query\_string" = ( field1:text AND field2:text2 NOT...) AND (... OR ....)  
But I also need operation for finding like [WORDS WITH INTERVAL] = regex('/text1 [a-z]+ [a-z]+ text2 /'😉  
How to combine it all together.  
First find by reqex and then put results in query\_string?

---

<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:** [September 4, 2018, 1:28pm UTC](https://discuss.elastic.co/t/es-subquery/143336/2 "2018-09-04T13:28:51Z")

</div>

Closed on September 4, 2018, 1:28pm UTC

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