Use the onear/n connector to find documents where a given word is followed within "n" words by another given word. Or, stated differently, to find documents where the first word precedes the second word by not more than "n" words. This connector is especially useful where a different word order significantly alters meaning. For example, "summary judgment" is significantly different from "judgment summary".
The value of "n" can be any number up to 255, and the two words must appear in the same document section. For example, the following search finds documents where the word "cat" is followed within three words by the word "dog":
cat onear/3 dog
As stated, the order in which the words appear within the document matters. Therefore, this search finds documents containing the terms "cats and dogs", "cats or dogs", and so on, but not "dogs and cats", "dogs or cats", and so on.
Similarity to other connectors
The onear/n connector operates exactly the same as the pre/n connector. It operates similarly to the /n connector, except that the order in which the words appear within the document does not matter to the /n connector.
Specifying the value of "n"
Although the value of "n" can be any number up to 255, you may want to choose a number less than 100, as choosing a number larger than 100 may retrieve results in which your search words appear in unrelated contexts. You may find these guidelines useful:
Using multiple onear/n connectors
Multiple /n connectors are processed from the smallest to the largest.