Booleans
Boolean logic defines logical relationships between terms in a search. The Boolean search operators are and, or and not. You can use these operators to create a very broad or very narrow search.
Note: When executing a search, And takes precedence over Or.
The following table illustrates the operation of Boolean terms:
And | Or | Not |
Each result contains all search terms. | Each result contains at least one search term. | Results do not contain the specified terms. |
The search heart and lung finds items that contain both heart and lung. | The search heart or lung finds items that contain either heart or items that contain lung. | The search heart not lung finds items that contain heart but do not contain lung. |
Using Booleans and Parentheses
To make even better use of Boolean operators, you can use parentheses to nest query terms within other query terms.
You can enclose search terms and their operators in parentheses to specify the order in which they are interpreted. Information within parentheses is read first, then information outside parentheses is read next. For example,
When you enter (mouse OR rat) AND trap, the search engine retrieves results containing the word mouse or the word rat together with the word trap in the fields searched by default.
If there are nested parentheses, the search engine processes the innermost parenthetical expression first, then the next, and so on until the entire query has been interpreted. For example,
((mouse OR rat) AND trap) OR mousetrap
Using Booleans When Phrase Searching
When Boolean operators are contained within a phrase that is enclosed in quotation marks, the operator is treated as a stop word. When this is the case, any single word will be searched for in its place.