# Achieving AND with span query

**URL:** <https://discuss.elastic.co/t/achieving-and-with-span-query/78730>\
**Category:** Elasticsearch\
**Created:** [March 15, 2017, 3:09pm UTC](https://discuss.elastic.co/t/achieving-and-with-span-query/78730 "2017-03-15T15:09:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Steiner](https://avatars.discourse-cdn.com/v4/letter/d/90ced4/32.png) [@David\_Steiner](https://discuss.elastic.co/u/David_Steiner)\
**Post date:** [March 15, 2017, 3:09pm UTC](https://discuss.elastic.co/t/achieving-and-with-span-query/78730/1 "2017-03-15T15:09:34Z")

</div>

I'm assuming that the way to achieve with multiple span queries is to use the "span\_near" query with a really, really large number in the slop. Is this correct? If not, what is? I'm looking to combine a phrase with a wildcard ("word1 word2\*") a word (word3) and another phrase ("word4 word5"). So, I can build all of those individual span queries, but I need to AND them together, I can only figure out that I use the "span\_near" will a really large number (bigger than any text string I could possibly have).

---

<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:** [April 12, 2017, 3:09pm UTC](https://discuss.elastic.co/t/achieving-and-with-span-query/78730/2 "2017-04-12T15:09:41Z")

</div>

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