Selects documents containing two or more words within
N
number of words of each other, where
N
is an integer. Document scores are calculated
based on the relative distance of the specified words when they are
separated by N
words or less.
For example, if the search expression NEAR/5
is used to
find two words within five words of each other, a document that has the
specified words within three words of each other is scored higher than a
document that has the specified words within five words of each other.
The N
variable can be an integer between 1 and
1024, where NEAR/1
searches for two words that are next to
each other. If N
is 1000 or above, you must specify
its value without commas, as in NEAR/1000
. You can specify
multiple search terms using multiple instances of
NEAR/N
, as long as the value of
N
is the same.
For example, to retrieve relevance-ranked documents that contain stemmed variations of the words "commute", "bicycle", "train", and "bus" within 10 words of each other, you can enter the following:
commute <NEAR/10> bicycle <NEAR/10> train <NEAR/10> bus
You can use the NEAR/N
operator with the
ORDER
modifier to perform ordered proximity searches.