Searching with Boolean Logic


PLWeb Turbo supports use of the Boolean logic operators OR, AND, and NOT. In the absence of explicit operators, PLWeb Turbo uses the default OR in evaluating queries.

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. Consider using Boolean queries only when a precisely restricted search is appropriate.
Note: You can enter query operators in upper- or lower-case. They are capitalized in the following examples only for purposes of clarity.

The OR Operator

The OR operator searches for records that contain either of the words it separates.

Syntax:

word1 OR word2
Example:

heaven OR hell
This query will retrieve any record that contains an occurrence of at least one of the two words.

Note: By default, OR is used as the default operator; you don't need to enter it explicitly unless a different default operator has been defined.

The AND Operator

The AND operator searches for records that contain both of the words it separates.

Syntax:

word1 AND word2
Example:

Burke AND Hare
This query will retrieve only those records that contain both of the words.

The NOT Operator

The NOT operator can be used in binary or unary form. In binary form, it searches for records that contain the query term that precedes it but do not contain the term that follows it. In unary form, it searches for all records that do not contain the term that follows it.

Syntax (binary):

word1 NOT word2
Syntax (unary):

NOT word
Examples:

media NOT television
NOT Gordian
The first query will retrieve only records that contain media and are without any occurrences of television.

The second query will retrieve any record that contains no occurrences of Gordian.

Combining Boolean Operators

You can combine Boolean operators in a single query.

Example:

New AND York NOT City
This query will retrieve records that contain both New and York, but do not contain City.

CAUTION: When combining Boolean operators in a query, you should keep in mind the logic imposed on the query by PLWeb Turbo's operator precedence rules. Precedence rules govern the order in which a query's operations are processed; the relative precedence of different operators may cause a query to be processed with logic that is not immediately obvious.
Tip: When combining operators in a query, you can control the order in which operations within the query are processed by using parentheses as delimiters.
[Previous Topic] [Contents] [Next Topic]