Precedence Evaluation  
 
 

The following rules apply for composing search expressions.

 
 
  Precedence rules  
 
 

While an expression is read from left to right, some operators carry more weight than others. For example, AND operators take precedence over OR operators. To ensure that an OR operator is interpreted prior to an AND operator, you can use parentheses to enclose the OR operator:

(a OR b) AND c

Terms enclosed by parentheses are read first.

There must be at least one space between operators and words used in the expression.

When the search engine encounters nested parentheses, it starts with the innermost term:

(a AND (b OR c)) OR d

This expression means: Look for documents that contain b or c as well as a, or that contain d.

 
 
  Prefix and infix notation  
 
 

Search strings that use any operator other than evidence operators can be defined in prefix notation or infix notation.

Prefix notation specifies that the operator comes before the search string:

AND (a,b)

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))

Infix notation specifies that the operator is to be specified between each term within the expression. The following example means: "Look for documents that contain a and b or documents that contain c":

a AND b OR 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.



 
 
BackUp LevelNext
 
 

allaire     AllaireDoc@allaire.com
    Copyright © 1998, Allaire Corporation. All rights reserved.