This topic contains examples of using proximity operators with nested subexpressions.

Using the two proximity operators as sub-expressions to the other Boolean operators is supported. For example, the expression:

(chardonnay NEAR/5 California) AND Sonoma

is a valid expression because NEAR is being used as a sub-expression to the AND operator.

However, you cannot use the non-proximity operators (AND, OR, NOT) as sub-expressions to the NEAR and ONEAR operators.

For example, the expression:

(chardonnay OR merlot) NEAR/5 California

is not a valid expression.

This invalid expression, however, could be specified as:

(chardonnay NEAR/5 California) OR (merlot NEAR/5 California)

The proximity operators are therefore leaf operators. That is, they accept only words and phrases as sub-expressions, but not the other Boolean operators.

Using proximity operators with the key restrict operator also has the same limitations when used as sub-expressions.

For example, the query:

("car maker" : aston) NEAR/3 martin

is not valid.

However, the following format for a key restrict operator is acceptable:

"car maker" : (aston NEAR/3 martin)

For other support limitations, see the topic about interaction of Boolean search with other features.


Copyright © Legal Notices