Results > Search and Retrieve > Boolean and Proximity Search > Proximity Search Operators

Proximity Search Operators
You can apply these operators to words, exact phrases, or Boolean expressions to execute a Proximity search. Note the following details:
*
*
Proximity operators do not count stop words. For example, because and is a stop word, the terms cat and dog have the proximity 1 in the text:
*
cat dog
*
*
IDOL server uses APCM (Adaptive Probabilistic Concept Modeling) to rank results.
*
Proximity operators work recursively so that nested Boolean queries can have proximity operators apply to brackets or phrases. For example, in the expression
(term1) NEAR10 ((term2) DNEAR2 (term3))
the NEAR10 operator ensures that term1 is in proximity to an occurrence of term2 within two of term3.
 
Returns only documents in which the second term is within N words of the first term—that is, the terms are N or fewer words apart. If you do not specify N, NEAR defaults to 5. For example:
This query returns only documents in which the term red is adjacent to the term green. For example, documents that contain red green or green red return. Documents that contain red orange green do not return (because the terms are not close enough to each other).
Directed NEAR. Returns only documents in which the second term is within N words of the first term, in the specified order. If you do not specify N, DNEAR defaults to 5. For example:
This query returns only documents in which the term green follows the term red, and is no more than two words away from the term red. For example, documents that contain red orange green return, while documents that contain green orange red or red orange blue green do not return.
Weighted NEAR (with OR operation). This proximity operator returns documents that contain either of the two terms. It promotes relevance when the terms are N or fewer words apart (closer together implies higher relevance). If you do not specify N, WNEAR defaults to 5. For example:
This query returns documents that contain either dog or cat. It gives extra relevance to documents in which dog and cat appear seven or fewer words apart in a piece of text. This weight increases as the terms get closer to each other. Documents in which the terms occur more than seven words apart, or in which only one term occurs, return with normal relevance.
Weighted NEAR (with AND operation). This proximity operator returns documents that contain both of the terms. It promotes relevance when the terms are N or fewer words apart (closer together implies higher relevance). If you do not specify N, YNEAR defaults to 5. For example:
This query returns documents that contain both dog and cat. It gives extra relevance to documents in which dog and cat appear seven or fewer words apart in a piece of text. This weight increases as the terms get closer to each other. Documents in which the terms occur more than seven words apart return with the normal relevance.
This query returns only documents in which the term green appears later than the term red.
You can also use BEFORE for FieldText queries. For a FieldText query to successfully compare two occurrences of the same field, the configuration parameter XMLFullStructure must be set to true in your IDOL server configuration file [Server] section.
This query returns only documents in which the term red appears later than the term green.
You can also use AFTER for FieldText queries. For a FieldText query to successfully compare two occurrences of the same field, the configuration parameter XMLFullStructure must be set to true in your IDOL server configuration file [Server] section.
This query returns only documents in which the term dogs follows the term cats and is exactly two words away from the term cats. This means that documents which contain cats and dogs return, while documents that contain dogs and cats or cats, dogs do not return.
This query returns only documents in which the term green appears in the same paragraph as the word red. The words do not have to be in the same sentence in the paragraph.