1. Home
  2. General
  3. Tutorials
  4. Proximity Search Tutorial

Proximity Search Tutorial

Overview

N.B. We apologise for the older video graphics presented, Please note the video content and tutorial is still very relevant to Proximity Search in Lens.

In this tutorial, we will discuss proximity or adjacency search technique that allows you to modify distances between these 2 terms or reorder them in the phrase with the help of a proximity operator and a number. The number specifies how many words you would like to have between these two terms.


How to Use

Tilde

Various search engines use different proximity operators such as N or W or NEAR. In the Lens we use the tilde, “~” character or symbol as a proximity operator and 0 as a default distance. If you process this search, you will be able to get the same results as searching without the operator and 0. With number 0 it means that there is No edits allowed between the two words. Note that the search results are identical with or without the tilde and 0.

Abstract:"Cancer treat"~0

It is important to clarify here that because the Lens search engine takes into consideration the root form of a word in a phrase, this search result would also reveal matches to not only the exact “cancer treat” phrase but also to “cancer treating” and also cancer treatment, if and when it exists.

Distance Units

If we replace 0 with 1, the search will allow us to find up to 1 word inserted between these two terms which means in addition to an exact match of these two terms, up to 1 edit is tolerated and thus allowing us to explore a larger number of search results compared to the last search wherein ~0 was used.

Abstract:"Cancer treat"~1

If we replace 1 with 2 distance units and process the search, you will observe that the number of search results have increased even further and the 2 distance units have allowed up to 2 edits. Moreover, 2 distance units allows for a swap of the term “ treat” from the second to first position (before Cancer) and a move of the word Cancer from first to second position. So the take home message here is that you need 2 distance units to have a transposition or a swap and boost your search results.

Abstract:"Cancer treat"~2

If you have more than 2 words such as Abstract:”Cancer cells treat” we would need 4 distance units to allow for transposition of these terms. The first 2 distance units are needed to move the term “treat” from third to second position and the second 2 distance units are needed to move it from second to first position and reordering the other terms.

Hope this demo for proximity search was useful to you. Enjoy using the Lens, a free, open and private resource for you and make sure that you are registered and logged in to save your searches and export larger number of documents. For any question/feedback, email us at Support@support.lens.org or Feedback@support.lens.org Thank you,

Updated on August 21, 2020
Was this article helpful?

Related Articles

Need Support?
Can't find the answer you're looking for? Submit a ticket and we'll get you an answer.
Submit Ticket