How to use (AND, OR, NOT) in Ancestry search queries.
When I first started writing Google search queries for my ancestor and historical research, I would start by entering my ancestor’s name with the impression/hope that Google would provide me a list of all the pages containing relevant information. I have since learned that searching the Web is a skill that can be learned, and with a bit of practice, you can find the information you seek.
AND, OR, NOT Boolean Operators for Ancestry Research
Table of Contents
- Define AND, OR, NOT Boolean Operators
- AND Operator
- OR Operator
- (-) NOT Operator
- Other Google Articles for Ancestry Research
I spent a good month searching testing and developing search queries in real-time to aid me with the research I was then performing. My first lesson was how to use 3 words (AND, OR, NOT) Boolean operators to modify my Google queries for ancestor research.
This article is part of 4 article series that includes:
- How to Get Great Google Search Results in Ancestry Research
- 21 Advanced and Essential Google Operators for Ancestry Research
- Energize Google Ancestry Research with AND, OR, NOT Boolean Operators
- How to Use the Google Wildcard Operators in Ancestry Research
In this article, I am going to talk about AND, OR, NOT Boolean Operators and how to use them for ancestry research.
Table of Contents
ToggleDefine AND, OR, NOT Boolean Operators
What are Boolean Operators and why are they important? Boolean searching is based on an algebraic logic system created by George Boole, a 19th-century English mathematician.
Boolean operators define the relationships between words or groups of words and are used to broaden or narrow a search. Boolean operators used to qualify search parameters to include:
- AND—Narrow the search and retrieve records containing all of the words it separates.
- OR—Broaden the search and retrieve records containing any of the words it separates. The ‘|’ and ‘;’ can be used instead of ‘or’ (e.g., ‘mouse | mice | rat’ is equivalent to ‘mouse or mice or rat’ is equivalent to ‘mouse ; mice ; rat’).
- NOT—Narrow the search and retrieve records that do not contain the term following it.
Examples of when to use Boolean Operators. Consider using Boolean Operators as follows:
- Too many records on your topic. If you are retrieving too many records on your topic, try adding another search term with the connector AND.
- Too many records on an unrelated topic. If you retrieve too many records on an unrelated topic, try eliminating a word with the connector NOT.
- Too few records on your topic. If you are retrieving too few records on your topic, try adding another search term with the connector OR.
AND Operator
AND operator narrows a search by telling Google that ALL keywords used must be found in a page in order for it to appear in your results list. Search for two or more concepts that interest you by combining descriptive keywords. Every space is an “implied AND,” and you don’t have to type it, as every blank space is interpreted as an AND operator. The Google search query for the AND operator can be written in the following variations:
- (Text) (Text)
- (Text) AND (Text)
Use “and” to get fewer results
It is often thought that you will get more results by adding more words to a Google search. The opposite is true. For example, I started a Google search with “Johnson family.” As I looked at the results, I continued to add more words to help refine my search. The more words I added, the better my search results because Google was looking for those words on the web page.
- Search 1: Johnson family
- Search 2: Johnson family genealogy
- Search 3: Johnson family genealogy Virginia
- Search 4: Johnson family genealogy Richmond Virginia
I continued to reorder words and see if that made a difference. When I placed “Richmond Virginia” at the front of the query, I saw many of the same pages returned, but it reordered and presented new pages and found exactly what I was looking for within the first five pages.
OR Operator
OR operator broadens the search and retrieves records containing any of the words it separates. You can have ‘this’ OR ‘that’ as in ‘sparrow OR robin’. The Google search will return ‘sparrow’ or ‘robin’ or ‘sparrow and robin’. The OR operator must be in all CAPS. The Google search query for the OR operator can be written in the following variations:
- (Text) OR (Text)
- (Text) ; (Text)
- (Text) | (Text)
- (Text)|(Text) (The | (vertical bar) need not be surrounded by spaces.)
The following search will find either “Germany” or “Austria” or both terms
- Germany OR Austria
- Germany | Austria
This search query will find pages that contain any one, two, or all three of the terms “Georgia,” “census,” and “tax”
Including OR in a search string
When you develop a search query that includes a series of terms with no other modifiers, Google sees them as having an AND between them. For example
- James Hampton Nebraska Kansas census tax
Google sees them as follows:
- James AND Hampton AND Nebraska AND Kansas AND census AND tax
If you put an “OR” or “|” (pipe) between two query terms, it applies to the two terms immediately to the left and right of the “OR”/”|” OR has higher precedence than AND. Let’s take the same phrase and OR.
- James Hampton Kansas OR Nebraska census OR taxes
Google sees “Kansas OR Nebraska census OR taxes as follows:
- (a OR b) AND (c OR d)
- (Kansas OR Nebraska) AND (census OR taxes)
With this understanding of the OR operator, let’s look at the following query:
- “Georg OR George Wagner” Boone OR “Blaine County” “Nebraska”
The query requires Google to include the following
- The terms Georg Wagner and/or George Wagner
- The terms Boone County and/or Blaine County
- The term Nebraska
(-) NOT
The (-) NOT operator is a special command that removes/excludes pages that mention a specific term from your search results. The Google search query for the minus operator can be written in the following variations:
- (Text) and Not (Text)
- (Text) -(Text)
- (Text) -(Text) -(Text)
- (Text) -(site:<website>)
The minus sign must be next to the word. If you use the minus sign with several words, there needs to be a space between the word and the next word. I prefer to use the minus sign.
Eliminating unwanted pages
In the course of any Google search, you will find page returns that you don’t want. You can reconfigure the search and start over, wade through the search results or use the (-) operator. For example, when I construct a search query on my last name Schreiber, I get results for “Schreiber Foods”, “Pablo Schreiber”, and “Schreiber Center for Pediatric Development”. I can eliminate all these references from the search query within a few seconds.
- Search 1: Schreiber
- Search 2: Schreiber -“Schreiber Foods”
- Search 3: Schreiber -“Schreiber Foods” -Pablo
- Search 4: Schreiber-“Schreiber Foods” -Pablo -Pediatric
Rather than trying to eliminate all the unwanted pages at once, I quickly glanced at my returns and was able to decide which pages I didn’t want. Notice I did not put a minus sign in front of “-Pablo Schreiber.” By simply putting a minus sign in front of “-Pablo,” I eliminated most of those references. The same is true with Schreiber Foods. By putting (” “) marks around “Schreiber Foods” I told Google that I wanted the three words to be treated as one word and to eliminate all references for the word combination.
Searching surnames that are also nouns
Surnames like Green, Blue, Bench, Church, and Rice can fill your Google search with unwanted results. For example, if you were doing a Google search for an ancestor named “Alex Rice,” you would get results for Rice University and rice recipes. To eliminate these pages simply put a (-) sign in from of the words “university” and “recipes.” The query would look like this:
Eliminating entire web domains from your search
It’s easy to eliminate entire web domains from your search using the minus operator. For example, if you were searching for security solutions regarding a specific problem with the Microsoft Windows operating system, you would have many pages in your return specific to Microsoft.com. What if you want to eliminate all the references from the domain Microsoft.com? Here is the query you would use:
- Microsoft windows security -site:microsoft.com
There are times when I want to exclude specific sites in genealogy because of the search returns. For example:
Advanced filtering to refine your query
As a genealogist, you will get to the point of knowing what queries work for you. Often, however, the searches that are working are also filled with irrelevant page returns. Rather than start a new search query, simply revise the current search. The following is a sample query using the (-) minus operator to filter and refine a search query:
- “Chestnut, Randy” OR “Randy * Chestnut” 1875 -Randall -Ohio -site:ancestry.com
In the query I was:
- Searching for name variations for “Randy Chestnut” with “Chestnut, Randy” OR “Randy * Chestnut”
- Searching a specific year 1875
- Filtering out “Randall” a name variation of “Randy”
- Filtering out references to the state of “Ohio”
- Filtering out pages from Ancestry.com
Other Google Articles for Ancestry Research
The following are other articles you may enjoy to help you Google your ancestry.
- QuickStart Beginners Guide to Ancestry Research
- How to Easily Google 18 Ancestor Records
- How to Get Great Google Search Results in Ancestry Research
- 21 Advanced and Essential Google Operators for Ancestry Research
- Energize Google Ancestry Research with AND, OR, NOT Boolean Operators
- How to Use the Google Wildcard Operators in Ancestry Research
- 4 Easy Steps to Google American Ancestry
- 26 Essential Google Search Skills for Ancestry Research
- 25 Google Reference Tips and Tricks for Ancestry Research
- 9 Advanced Google Search Strategies to Trace Ancestors
- 7 Advanced Google Search Features for Genealogy Websites
- Google Queries for Blogs, Social Networks and More
- Google Quick Helps for Ancestry Research
- 17 Ways to Google Name Variations in Ancestry Research
- 15 New Google Specialty Searches for Tracing Ancestors
- How to Google Record Collections of Libraries, Societies and More
- How to Cite and Verify Sources for Google Ancestry Research
- 37 Everyday Google Queries for Home, Work and Play
- How to Use US Postal Code Abbreviations for Google Ancestry Research
- Use Google Country-Specific Search Engines for Ancestry Research
- 10 Google Search Techniques for Family History Research
- The Complete Guide To Google Search Operators