
ht://Dig supports Boolean operators for advanced queries. Select Boolean after the initial results have been returned from the match pull-down menu to perform a Boolean query. You can now enter searches using Boolean notation ( ( ), AND, OR, NOT, &, |, !). These operators can be combined to allow the construction of very complex queries.
Boolean Operators
- AND, &
AND links two or more terms together to narrow a search. Only pages containing all the terms listed will produce a successful result. For example, Nostradamus AND prophesy will return results with both the term Nostradamus and the term prophesy in the pages.
- OR, |
OR or | ("pipe") links two terms and collects all documents that include either term. For example, searching for design OR "graphic arts" will bring up pages containing one or both terms.
- NOT, !
The NOT or ! operator will search for records that contain the query term that precedes it, but do not contain the term that follows it. For example, searching for boxers NOT shorts will produce documents related to pugilists without mistakenly giving you articles about trousers that do not descend below the knee.
- ( )
Each of the Boolean operators described above will work on either a simple search term or a more complex query marked by parentheses. This allows you to construct very powerful queries. For example,
"bed and breakfast" AND ((grapes AND California) OR "wine country") and
((hacker OR programmer) NOT "part time") AND (design OR "graphic arts")
|