How Library Stuff Works: Boolean Operators (AND OR NOT) McMaster University Libraries.
How Library Stuff Works: Boolean Operators McMaster University Libraries.
**DISCLAIMER** Databases and search engines vary and may use portions of Boolean Searching. This information sheet is general tips & tricks and is meant to help in general use. Check the specific database or search engine (use the help screen) to see the operators it uses.
Boolean searching is the most powerful way of searching a computer and may be used in many of the library's electronic databases, the Internet (Google) as well as the Library Catalog. Boolean searching uses three "operators" to combine your keywords into a more powerful and direct searches. The basic Boolean operators are AND, OR and NOT. The operator you choose to combine keywords determines how the computer performs the search and what information it returns. Capitalizing the Boolean operators is not necessary in all databases but is a good habit to have.
For example Searching Crime you would get 255,666 results while searching just Poverty gets 86,972 results. Searching Crime AND Poverty gets 2798 results. The results are only about crimes that are related to poverty.
For example: Doing research on Dementia but you do not want to include the topic of Alzheimer’s you would search Dementia NOT Alzheimer’s disease to receive all of the information regarding Dementia that is NOT related to Alzheimer’s disease.
*NOT is a very powerful operator that should be used with caution.
For example, kids can also be thought of as children, or youth in keyword searching the computer is literally looking for the word you ask for not the concept, so if you search for Kids you only get 143,389 results but by searching Youth OR Kids OR Children your results are 1,903,976 over a million more results. Many databases offer suggestions connected by OR to offer you greater search results.
When needing to do more advanced searching there are a few more tricks that can help you create more effective search strings. The use of tools such as Exact Phrase (or the use of quotation marks), Wild Card and Truncation symbols, effective use of Nesting and the use of Proximity Operators are all more advanced searching tools that can assist you in creating successful search strings. For the most part web search engines like Google do not respond to the use of these more advanced searching techniques but they can be useful in the Library Databases.
**DISCLAIMER** Databases and search engines vary and may use portions of Advanced Searching. This information is general tips & tricks and is meant to help in general use. Check the specific database or search engine (use the help screen) to see the operators it uses.
Quotation Marks or Phrases in Quotes AKA Exact Phrase
Using "quotation marks" to enclose your search terms will force the computer to find your search string EXACTLY as you have it creating what is know as an Exact Phrase search. Unlike using AND where your search results will include both words ANYWHERE in the results using quotation marks is designed to find your search words as an exact phrase in the order you have typed it.
Example: “Microsoft Office” will only find results where Microsoft is followed directly by Office so it will not find an article with “in my office I use Microsoft” nor will it find “Office suite by Microsoft”.
Google excludes common words in English and in other languages it calls these stop words. Words such as the, I, “la” (which means “the” in Spanish) and “de” (which means “of” in French, Spanish, Italian, and Portuguese). When Google ignores a term critical to your search, e.g., LA (common abbreviation for Los Angeles), enclose the term in quotes.
Computers usually perform AND and NOT searches first, then the OR searches but like in a math equation you can force the computer to perform the OR search first with Nesting. Nesting uses parenthesis () to encase the OR search string forcing the computer to complete the OR search first then move on to the AND or NOT search.
(Georgia OR South Carolina) AND "Teaching Shortage"
SO it first creates a large pool with the OR search then limits down the results with the AND or NOT search. The computer first searches for everything that has either Georgia OR South Carolina in it and then from that pool of results it finds items related to Teaching Shortages.
With this search people call electronic mail by several terms combining them in an OR search encased in parenthesis creates a pool of results that include all of the variations of terms for electronic mail and then it limits that pool to only those results that ALSO talk about security.
Proximity (aka positional) Operators are not really part of Boolean Logic, but like Boolean they help formulate search statements. Not all search engines or databases accept Proximity Operators so make sure to read the help screen for more advanced help. N# (near) and W# (within) are Proximity Operators that will connect words together similar to using the “quotation marks”. Using N# or W# followed by a number tells the computer you want the two search words to be found within a certain number of words of each other.
Within or W# searches for your two keywords in the order of your search string with a maximum number of words between them.
Example: repressed W8 memory will find articles that have the word repressed first with up to eight words apart from the word memory. Key here is that repressed is BEFORE memory.
Near or N# searches for your two keywords regardless of the order in which they appear and are separated but a maximum of words apart.
Example: tax N5 codes will find articles that have the words tax and codes a maximum of five words apart no matter the order in which they appear.
ADJ (or adjacent to) is a way to link words into phrases like quotation marks, it tells the computer that the keywords must be found next to one another but unlike quotation marks the words can appear in either order. This can be helpful if you are unsure if an author is listed first name then last or the other way around.
Example: Ernest ADJ Hemingway will find both Ernest Hemingway and Hemingway, Ernest.