# Is there a way to search two words, in Content, by defining their proximity to one-another?

**URL:** <https://discourse.devontechnologies.com/t/is-there-a-way-to-search-two-words-in-content-by-defining-their-proximity-to-one-another/59449>\
**Category:** DEVONthink\
**Created:** [November 12, 2020, 7:48pm UTC](https://discourse.devontechnologies.com/t/is-there-a-way-to-search-two-words-in-content-by-defining-their-proximity-to-one-another/59449 "2020-11-12T19:48:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryan\_N](https://discourse.devontechnologies.com/letter_avatar_proxy/v4/letter/r/13edae/32.png) [@Ryan\_N](https://discourse.devontechnologies.com/u/Ryan_N)\
**Post date:** [November 12, 2020, 7:48pm UTC](https://discourse.devontechnologies.com/t/is-there-a-way-to-search-two-words-in-content-by-defining-their-proximity-to-one-another/59449/1 "2020-11-12T19:48:55Z")

</div>

The best example I can offer, is the very last criterion field in the Library of Congress’ _Chronicling America_ [Advanced Search page](https://chroniclingamerica.loc.gov/#tab=tab_advanced_search), which I use constantly.

There, I can search for instances of [_Word-A_ AND _Word-B_] in which no more than, say, five words are in-between the two. This feature is a godsend for research in the humanities. Can DT do this now and/or is this a feasible feature to recommend for future builds? Thanks!

---

<div class="post-metadata">

**Author:** ![pete31](https://discourse.devontechnologies.com/letter_avatar_proxy/v4/letter/p/d26b3c/32.png) [@pete31](https://discourse.devontechnologies.com/u/pete31)\
**Post date:** [November 12, 2020, 7:53pm UTC](https://discourse.devontechnologies.com/t/is-there-a-way-to-search-two-words-in-content-by-defining-their-proximity-to-one-another/59449/2 "2020-11-12T19:53:31Z")

</div>

> [@Ryan\_N](#):
>
> Can DT do this now

DEVONthink can do this since at least several years

> term1 NEAR term2: term1 occurs 10 words or less before or after term2

> term1 NEAR/n term2: term1 occurs n or less words before or after term2

---

<div class="post-metadata">

**Author:** ![BLUEFROG](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/bluefrog/32/135_2.png) [@BLUEFROG](https://discourse.devontechnologies.com/u/BLUEFROG)\
**Post date:** [November 12, 2020, 7:54pm UTC](https://discourse.devontechnologies.com/t/is-there-a-way-to-search-two-words-in-content-by-defining-their-proximity-to-one-another/59449/3 "2020-11-12T19:54:35Z")

</div>

The **NEAR/_n_** operator is is covered in the **Help \> Documentation \> Appendix \> Search Operators**.

---

<div class="post-metadata">

**Author:** ![Ryan\_N](https://discourse.devontechnologies.com/letter_avatar_proxy/v4/letter/r/13edae/32.png) [@Ryan\_N](https://discourse.devontechnologies.com/u/Ryan_N)\
**Post date:** [November 12, 2020, 8:05pm UTC](https://discourse.devontechnologies.com/t/is-there-a-way-to-search-two-words-in-content-by-defining-their-proximity-to-one-another/59449/4 "2020-11-12T20:05:14Z")

</div>

@pete31 @BLUEFROG GLORIOUS! I should have asked about this weeks ago. Jim, TY for help reference. Not sure how I missed it last night. Way good!

---

<div class="post-metadata">

**Author:** ![pete31](https://discourse.devontechnologies.com/letter_avatar_proxy/v4/letter/p/d26b3c/32.png) [@pete31](https://discourse.devontechnologies.com/u/pete31)\
**Post date:** [November 12, 2020, 8:09pm UTC](https://discourse.devontechnologies.com/t/is-there-a-way-to-search-two-words-in-content-by-defining-their-proximity-to-one-another/59449/5 "2020-11-12T20:09:12Z")

</div>

BTW you could index a copy of Jim’s great help resource with [this script](https://discourse.devontechnologies.com/t/indexing-help-or-macos-help-viewer-vs-devonthink/46475/20). It makes looking up things very easy.

---

<div class="post-metadata">

**Author:** ![BLUEFROG](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/bluefrog/32/135_2.png) [@BLUEFROG](https://discourse.devontechnologies.com/u/BLUEFROG)\
**Post date:** [November 12, 2020, 8:09pm UTC](https://discourse.devontechnologies.com/t/is-there-a-way-to-search-two-words-in-content-by-defining-their-proximity-to-one-another/59449/6 "2020-11-12T20:09:15Z")

</div>

You’re welcome. 🙂
