Boolean search refers to a search for documents using boolean operators to specify what words the retrieved documents should contain. Internet search engines that offer boolean searching capability include AltaVista, Lycos, Excite, Northern Light, and Inktomi-based search portals such as HotBot and Snap. Most of these require that you go to the "Advanced Search" part of their site in order to use boolean search.

Boolean search isn't restricted to Internet search engines -- it's also a standard in many document retrieval systems.


Boolean logic includes three operators: In the standard syntax used by most boolean search engines, these operators are used in infix notation, meaning they are inserted between two words.
AND: This operator is used when you want to find documents that include all the words you use in your search. For example,
         dogs AND cats
will retrieve documents that include both the word "dogs" and the word "cats".
         dogs AND cats AND parrots
will only retrieve documents that mention all three words.

OR: This operator is used when you want to find documents that mention at least one of the words\ .

         dogs OR cats OR parrots
will retrieve any document that includes the word "dogs" as well as any document that includes the word \ "cats" or the word "parrots", without requiring that they include all three.

NOT: This operator is used when you want to exclude from your search results documents that mention a particular word.

         dogs NOT cats
will retrieve documents which include the word "dogs", but will omit any of them that include the word "\ cats".


Some search engines, namely Alta Vista and Lycos, support the "NEAR" operator. This is not strictly a boolean operator, but can be used in expressions along with the other boolean operators. This operator allows you to specify that the retrieved documents should have the two related words in close proximity within the document. For example,
         dean NEAR martin
retrieves documents that contain both words, and where they are close together. The exact proximity varies from search engine to search engine, and is in some cases specifiable.

However, almost all the search engines allow the use of quotes to match exact phrases, so for the example above, it would be better to search for "dean martin".

Complex expressions

It is possible to create boolean search expressions that combine multiple operators. When you do this, it is often necessary to use parentheses to say how the complex expression should be interpreted. For example,
         (dogs OR cats) AND veterinarian
will give different results than
         dogs OR (cats AND veterinarian)
The first example will find documents that either mention dogs and veterinarians, or they mention cats and veterinarians. The second will return a set of documents, some of which mention dogs (maybe only dogs), and some of which mention both cats and veterinarians.

I've heard tell that a lot of sites have had problems with the "obvious" meanings of AND and OR. Turns out that a lot of users imagine that a query for "dogs AND cats" will get them all the documents about dogs, and also all the documents about cats -- that is, they think of AND as meaning what the programmer means by OR. There are sites that try to avoid these terms because of the possibility of confusion, and for all I know there are misguided sites which get them backwards.

Log in or register to write something here or to contact authors.