# Is there an ability to force the direction of proximity terms?

**URL:** <https://discuss.elastic.co/t/is-there-an-ability-to-force-the-direction-of-proximity-terms/52267>\
**Category:** Elasticsearch\
**Created:** [June 8, 2016, 11:49pm UTC](https://discuss.elastic.co/t/is-there-an-ability-to-force-the-direction-of-proximity-terms/52267 "2016-06-08T23:49:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lawyerdude666](https://avatars.discourse-cdn.com/v4/letter/l/2acd7d/32.png) [@lawyerdude666](https://discuss.elastic.co/u/lawyerdude666)\
**Post date:** [June 8, 2016, 11:49pm UTC](https://discuss.elastic.co/t/is-there-an-ability-to-force-the-direction-of-proximity-terms/52267/1 "2016-06-08T23:49:32Z")

</div>

The documentation lists the syntax for proximity searches as "[word 1] [word 2]", #

So if I want to find the word QUICK within 3 words of the word FOX, I'd write the expression as "quick fox", 3

That means that I'll get a hit if QUICK either precedes or follows FOX. I don't want that. I want to be able to force directionality. So, for example, I want to have a hit if the search finds "quick brown fox" but not "that fox was quick." Other solutions would handle it by using syntax like: a) quick +2 fox b) quick FOLLOWEDBY,2 fox or c) fox PRECEDEDBY,2 quick.

Does ES have the ability to do what I need?

---

<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, 10:45pm UTC](https://discuss.elastic.co/t/is-there-an-ability-to-force-the-direction-of-proximity-terms/52267/2 "2017-07-05T22:45:14Z")

</div>

Closed on July 5, 2017, 10:45pm UTC


