Composing Search Expressions

The following rules apply for composing search expressions.

Precedence rules

Expressions are read from left to right. The AND operator takes precedence over OR operators. However, terms enclosed in parenteses are evaluated first. When the search engine encounters nested parentheses, it starts with the innermost term:

Prefix and infix notation

Search strings that use any operator other than evidence operators can be defined in prefix notation or infix notation. This means that either of the following expressions is valid:

When prefix notation is used, precedence is handled explicitly within the expression. The following example means: "Look for documents that contain b and c first, then documents that contain a":

OR (a, AND (b,c))

When infix notation is used, precedence is implicit in the expression. For example, the AND operator takes precedence over the OR operator.

Commas in expressions

If an expression includes two or more search terms within parentheses, a comma is required as a separator between each element. The following example means: Look for documents that contain any combination of a and b together. Note that in this example, angle brackets are used with the OR operator.

<OR> (a, b)

Delimiters in expressions

Angle brackets < >, double quotation marks " ", and backslashes \ are used to delimit various elements in a query expression.

Angle brackets for operators

Left and right angle brackets < > are reserved for designating operators and modifiers. They are optional for the AND, OR, and NOT operators, but required for all other operators.

Double quotation marks in expressions

You use double quotation marks to search for a word that is otherwise reserved as an operator, such as AND, OR, and NOT.

Backslashes in expressions

To include a backslash \ in a search, insert two backslashes for each backslash character you want to search for, such as C:\\CFUSION\\BIN.