Building a Complex Query

When you formulate a complex query--a query that includes more than one type of operator--you can use parentheses as scope of operation delimiters. If you are familiar with algebra, you will recognize the use of these delimiters as a way to establish the scope of a particular mathematical operation. In a query, they can delineate the range of terms that a particular operator influences, or control the order in which operations within the query are evaluated.

PLWeb Turbo queries support infinite levels of parenthetical nesting (one set of delimiters inside another). Nested expressions are evaluated in order from the lowest nesting level to the highest.

Most query operators do not distribute through scope of operation delimiters. For example, both of the following queries:

(Buttafuoco Gillooly)!
(Buttafuoco Gillooly)#
will be interpreted as:

Buttafuoco OR Gillooly
The exceptions to this rule are field restriction operators, which will distribute through a nested query expression.


United ADJ (States Nations)
(space shuttle) w/2 (program research)
In the first query, the adjacency operation will apply to United and the results of the delimited OR operation. Without the scope of operation delimiters, PLWeb Turbo's precedence rules will cause the query to be evaluated as:

(United ADJ States) OR Nations
In the second example, the proximity operation will be applied to all possible results of the two delimited OR operations. Without the delimiters, the higher precedence of the proximity operator will cause the query to be evaluated as:

space OR (shuttle W/2 program) OR research
Tip: You should rely on natural language queries; they will usually retrieve useful information that Boolean queries can exclude. With relevance ranking at work, you need not be concerned with reducing the number of retrieved records. Unless you are an expert at Boolean searching, you will generally get better results from natural language queries.
[Previous Topic] [Contents] [Next Topic]