Applied Searching  «Prev  Next»

Lesson 3 Searching with Boolean operators
Objective Use Boolean operators in search queries.

Searching with Boolean Operators

Are you having problems finding exactly what you want with just a keyword search? Advanced Search operators provide ways to further refine your search query. One type is the Boolean operator, named after British mathematician George Boole (1815-1864), who made a study of combining logic with mathematics. Major search services support Boolean operators, but each search service may implement them differently.
  • Boolean Operators: Boolean operators are connecting words--words that you can use to specify relationships between the keywords or phrases in your search query. Boolean operators can be used as words or as symbols:

Boolean AND Operator

This operator requests that multiple words and phrases all be present in your query results and displays these results at the top of the list of results. However, most search engines and directories interpret this operator in a way that does not prohibit results that do not include all the words or phrases. Searching for education AND computer will return documents that contain both the word "computer" and the word "education" in them as the top results.
  • Characteristics of Search: Understanding how a search engine works helps you to understand how your pages are ranked in the search engine, but how your pages are found is another story entirely. That is where the human element comes in. Search means different things to different people. For example, one of my colleagues searches the Internet using the same words and phrases he would use to tell someone about a topic or even the exact question that he’s trying to get answered. It’s called natural language. Another, however, was trained in search using Boolean search techniques. She uses a very different syntax when she is creating a search term. Each of them returns different search results, even when each is using the same search engines. The characteristics of search refer to how users search the Internet. This can be everything from the heuristics they use when creating a search term to the selection the user makes once the search results are returned. One interesting fact is that more than half of American adults search the Internet every time they go online. And in fact, more people search the Internet than use the yellow pages when they’re looking for phone numbers or the locations of local businesses. This wealth of search engine users is fertile ground for SEO targeting. And the better you understand how and why users use search engines, and exactly how search engines work, the easier it will be to achieve the SEO you’re pursuing.
  • What is Boolean Search?
    Boolean searches allow you to combine words and phrases using the words
    1. AND,
    2. OR,
    3. NOT and
    4. NEAR

    (otherwise known as Boolean operators) to limit, widen, or define your search. Most Internet search engines and Web directories default to these Boolean search parameters anyway, but a good Web searcher should know how to use basic Boolean operators.



Phrase Searching

You can group words together to make certain that they aer searched for as a phrase by placing them within quotation marks. Some search engines allow you to create phrases by placing punctuation between the phrase's words or including them inside parentheses.
adult:continuing:education or 
(adult continuing education).

When you are searching, think of a phrase that describes your topic, such as "adult continuing education". Using this phrase will ensure that your results include the words together, instead of returning a document that contains all three words, but with no relationship to one another.
  • Fuzzy Logic: Fuzzy logic technically refers to logic that is not categorically true or false. A common example is whether a day is sunny (i.e., is 50% cloud cover a sunny day?). In search, fuzzy logic is often used for misspellings. When you select "all of the words" on a search page, it is the equivalent of keyword1 AND keyword2 AND keyword3... and so on. When you select "any of the words" on a search page, it is the equivalent of keyword1 OR keyword2 OR keyword3... and so on.
    Although you can use symbols instead of the actual word, use of the actual word is recommended; different search engines may use different symbols to represent Boolean operators, but the actual words will always be the same.


Boolean NOT Operator

The Boolean NOT operator, typically represented by a minus sign (-) in Google Search, is used to exclude specific words or phrases from search results, helping to refine and focus your query. To use it effectively, place the minus sign directly before the term you want to exclude, without a space between the operator and the term. For example, searching apple -fruit will return results about the company Apple or other uses of the word "apple" while excluding pages primarily about the fruit. This is particularly useful when a term has multiple meanings or when you want to eliminate irrelevant results, such as searching jaguar -car to find information about the animal instead of the vehicle. Ensure the excluded term is specific enough to avoid overly broad filtering, which might inadvertently remove relevant results.
When using the NOT operator, combine it with other search techniques for greater precision. For instance, you can pair it with quotation marks to exclude exact phrases, like recipes -"gluten free" to find recipes that don’t focus on gluten-free options. Be cautious with placement, as the operator only affects the term immediately following it, and avoid using it excessively, as over-excluding terms can overly narrow your results. If you’re troubleshooting a search with unexpected outcomes, check that the minus sign is correctly placed and that the excluded term isn’t too general. Testing variations of your query, such as best laptops -macbook versus best laptops -apple, can also help fine-tune results to match your intent. The NOT operator provides you with a way to exclude unwanted documents from your search. It allows you to search for one keyword or phrase while excluding another keyword or phrase sometimes associated with the first. If you notice that your query results include many unrelated items stemming from another meaning of your keyword, try using NOT. If you are interested in finding information on flying bats and not baseball bats, try bat NOT baseball.
When to use NOT and when not to use NOT!
NOT is appropriate when a word is used in different contexts. For example, the search vikings not minnesota retrieves records about Vikings but not the Minnesota Vikings. This is what you want if you are studying Medieval Viking sagas. If you are researching pro football, it's not. The Boolean Operator NOT was used by George Boole to implement Boolean Algebra.

Grouping Operators

You can compose search queries by grouping keywords and Boolean operators. This allows you to look for references that contain this AND that, but NOT something else. The next lesson will introduce ways of refining a search that are more restrictive than AND, OR, and NOT, but Boolean operators may still be a good choice for some complex search queries.
Grouping Keywords and Operators
Another advanced searching technique is the use of parentheses ( ) to create complex logic. You can group words or phrases by placing them inside parentheses. Using this technique in combination with operators can give you one search query that both includes and excludes in the same search. This is a powerful technique. Here is an example of a search query that will find information on professional football team mascots without getting any information on high school or college football team mascots. football AND mascot AND NOT (college OR high).
Although this will screen out most unwanted matches, you may still find a small number of results that include high school or college football teams if the Web page only has the high school or college team name and not the words "high school" or "college." Each entry typically includes the syntax, the capabilities, and an example. Some of the search operators will not work as intended if you put a space between the colon (:) and the subsequent query word. If you do not care to check which search operators require no space after the colon, always place the keyword immediately next to the colon. Many search operators can appear anywhere in your query. In our examples, we place the search operator as far to the right as possible. We do this because the Advanced Search form writes queries in this way. Also, such a convention makes it clearer as to which operators are associated with which terms.

Search Boolean Operators - Exercise

Click the Exercise link below to compare search results with different Boolean operators and grouping.
Search Boolean Operators - Exercise

SEMrush Software 3 SEMrush Banner 3