# Specifying a Phrase within a Proximity Phrase Search?

**URL:** <https://discuss.elastic.co/t/specifying-a-phrase-within-a-proximity-phrase-search/18744>\
**Category:** Elasticsearch\
**Created:** [July 18, 2014, 8:09pm UTC](https://discuss.elastic.co/t/specifying-a-phrase-within-a-proximity-phrase-search/18744 "2014-07-18T20:09:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tbrianjones](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tbrianjones/32/1402_2.png) [@tbrianjones](https://discuss.elastic.co/u/tbrianjones)\
**Post date:** [July 18, 2014, 8:09pm UTC](https://discuss.elastic.co/t/specifying-a-phrase-within-a-proximity-phrase-search/18744/1 "2014-07-18T20:09:33Z")

</div>

I'm using the a Query String Query to perform a Proximity Search.

I'm wondering if ( and if yes how ) I can nest a phrase within the overall  
phrase:  
"wood glue manufacturer"~5 ( where "wood glue" would be kept as a phrase )

My users have access to a Query String Query box and I'm exploring more  
advanced search capability through this box ... so performing the  
equivalent with other Query types is not helpful here ... for instance, I  
know that I can use a Span Near Query to accomplish this.

--  
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/e77f989c-81d9-4ccd-9723-e82f371faf20%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e77f989c-81d9-4ccd-9723-e82f371faf20%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Kevin\_Brown](https://avatars.discourse-cdn.com/v4/letter/k/73ab20/32.png) [@Kevin\_Brown](https://discuss.elastic.co/u/Kevin_Brown)\
**Post date:** [March 29, 2016, 4:52pm UTC](https://discuss.elastic.co/t/specifying-a-phrase-within-a-proximity-phrase-search/18744/2 "2016-03-29T16:52:36Z")

</div>

Have you found a way? I think the span is the only way to do it. Which is unfortunate because it requires complicated parsing of users' queries. Please post if you found a way!

---

<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 5, 2017, 11:04pm UTC](https://discuss.elastic.co/t/specifying-a-phrase-within-a-proximity-phrase-search/18744/3 "2017-07-05T23:04:19Z")

</div>


