Using WITHIN-n to do a proximity search

A proximity search searches for words that occur within n words of each other and in the order shown.

A proximity search is written as:

wordone WITHIN-n wordtwo

where:

n specifies up-to-how-many-words-apart the words can be

WITHIN must be in ALL CAPS

wordone and wordtwo need to be single words – they cannot be multiple words in quotes, nor can they be another search

Examples, searching the “Title” field for:

new WITHIN-4 invention

All titles in which ‘new’ occurs up to 4 words before ‘invention’

business WITHIN-0 strategies

All titles in which ‘business’ comes right before ‘strategies’ (they might be separated by punctuation)

business WITHIN-1 strategies

All titles in which ‘business’ and ‘strategies’ are either next to each other or are separated by at most one word, and appear in that order

Only single words can be used with the proximity operator; the fields cannot be in quotes or parentheses!  Examples:

DOESN’T work:  employment WITHIN-5 (south AND africa)

DOESN’T work:  employment WITHIN-5 “south africa”

However, you can put the whole proximity operation in parentheses and use it as a field with a boolean operator.  Example:

WORKS:  employment AND (south WITHIN-2 africa)