Proximity Operators

Proximity operators specify the relative location of specific words in the document; i. e., specified words must be in the same phrase, paragraph, or sentence for a document to be retrieved. In the case of the NEAR and NEAR/N operators, retrieved documents are relevance-ranked based on the proximity of the specified words.

When proximity operators are nested, the ones with the broadest scope should be used first; that is, phrases or individual words can appear within SENTENCE or PARAGRAPH operators, and SENTENCE operators can appear within PARAGRAPH operators. The following table describes each proximity operator.

Operator name Description
IN Selects documents that contain specified values in one or more document zones. A document zone represents an attribute in a content, for example the date of the last change (lastChanged) or the body text.
PHRASE Selects documents that include a phrase you specify. A phrase is a grouping of two or more words that occur in a specific order.
SENTENCE Selects documents that include all of the words you specify within the same sentence.
PARAGRAPH Selects documents that include all of the search elements you specify within the same paragraph.
NEAR Selects documents containing specified search terms, where the closer the search terms are within a document, the higher the document’s score.
NEAR/N Selects documents containing two or more search terms within N number of words of each other, where N is an integer up to 1024. The closer the search terms are within a document, the higher the document’s score.