Upcoming SlideShare
×

# Boolean Logic Searching: A Primer

8,581
-1

Published on

Published in: Education, Technology, Design
4 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

Views
Total Views
8,581
On Slideshare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
0
0
Likes
4
Embeds 0
No embeds

No notes for slide

### Boolean Logic Searching: A Primer

1. 1. Boolean Logic Searching: A Primer<br />Original Web content by Laura Cohen ©2010. Used with permission.<br />Adapted to MicroSoft PowerPoint slides by Cynthia S. Wetzel, MGCCC, Perkinston Campus Library. For educational use only. ©2010<br />
2. 2. Boolean Logic Searching: A Primer<br />… “something about Boolean logic is counter-intuitive for many otherwise intelligent people.”<br />
3. 3. Boolean Logic Searching<br />The Internet is a vast computer database which is searched according to the rules of computer database searching.<br />Much database searching is based on the principles of Boolean logic.<br />Boolean logic refers to the logical relationship among search terms, and is named for British-born Irish mathematician George Boole.<br />On Internet search engines, the options for constructing logical relationships among search terms often modify traditional practices of Boolean searching (see Boolean Searching on the Internet tutorial, following this primer).<br />
4. 4. Boolean Operators<br />Boolean logic consists of three logical operators: <br />AND<br />OR<br />NOT<br />Each operator can be visually described by using Venn diagrams<br />The following slides illustrate how these three operators function. <br />
5. 5. ORlogicQuestion: I would like information about college.<br />In this type of search, we will retrieve records in which <br />AT LEAST ONE<br />of the search terms is present. <br />We are searching on the terms college and also university since documents containing either of these words might be relevant. <br />college OR university<br />
6. 6. ORlogicQuestion: I would like information about college.<br />This is illustrated by: <br /><ul><li>the shaded circle with the word college representing all the records that contain the word “college.”
7. 7. the shaded circle with the word university representing all the records that contain the word “university.”
8. 8. the shaded overlap area representing all the records that contain both “college” and “university.”</li></ul>college OR university<br />
9. 9. ORlogic<br />OR logic is most commonly used to search for synonymous terms or concepts. <br />Here is an example of how ORlogic works: <br />ORlogic collates the results to retrieve all the unique records containing one term, the other term, or both of them. <br />
10. 10. ORlogicQuestion: I would like information about college.<br />The more terms or concepts we combine in a search with OR logic, the more results we will retrieve. <br />college OR university OR campus<br />
11. 11. ORlogic<br />Both examples: <br />
12. 12. ANDlogic Question: I'm interested in the relationship between poverty and crime.<br />In this search, we retrieve records in which BOTH of the search terms are present. <br />This is illustrated by the shaded area overlapping the two circles representing all the records that contain both the word “poverty” and the word “crime.”<br />poverty AND crime<br />Notice how we do not retrieve any records with only “poverty” or only “crime.”<br />
13. 13. Andlogic<br />Here is an example of how AND logic works:<br />
14. 14. ANDlogic Question: I'm interested in the relationship between poverty and crime.<br />The more terms or concepts we combine in a search with ANDlogic, the fewerresults we will retrieve. <br />poverty AND crime AND gender<br />
15. 15. ANDlogic<br />Both examples: <br />
16. 16. NEAR: a restrictive AND<br />In addition: a very few search engines make use of the proximity operator NEAR.<br />A proximity operator determines the closeness of terms within the text of a source document. NEAR is a restrictive AND. <br />The closeness of the search terms is determined by the particular search engine.<br />Most search engines default to proximity searching. <br />
17. 17. Combined ANDand ORlogicQuestion: I want information about the behavior of cats.<br />The use of parentheses in this search is known as forcing the order of processing.<br />In this case, we surround the OR words with parentheses so that the search engine will process the two related terms as a unit. The search engine will use AND logic to combine this result with the second concept. Using this method, we are assured that the semantically-related OR terms are kept together as a logical unit.<br />behavior AND<br />(cats ORfelines)<br />
18. 18. NOTlogic Question: I want information about cats, but I don't want to see anything about dogs.<br />This search retrieved records in which ONLY ONE of the terms is present, the one we have selected by our search terms.<br />This is illustrated by the shaded area with the word cats representing all the records containing the word “cats.”<br />cats NOT dogs<br />No records are retrieved in the area overlapping the two circles where the word “dogs” appears, even if the word “cats” appears there too.<br />
19. 19. NOTlogic<br />NOT logic excludes records from your search results. <br />Here is an example of how NOTlogic works: <br />
20. 20. NOTlogic<br />“cats are smarter than dogs”<br />Be careful using NOT: the term you want may be present in an important way in documents that also contain the word you wish to avoid. <br />For example, a Web page includes the statement “cats are smarter than dogs.” The search illustrated above would exclude this document from your results.<br />
21. 21. <ul><li>Using OR</li></ul>more terms = more results<br /><ul><li>Using AND</li></ul>more terms = fewer results<br /><ul><li>Using NOT</li></ul>narrowly defines results<br />
22. 22. Boolean Searching on the Internet<br />When you use an Internet search engine, the use of Boolean logic may be manifested in three distinct ways: <br />Full Boolean logic with the use of the logical operators <br />Implied Boolean logic with keyword searching <br />Boolean logic using search form terminology<br />
23. 23. Quick Comparison ChartFull Boolean vs. Implied Boolean vs. Search Form <br />
24. 24. 1. Full Boolean Logic with Logical Operators<br />Few search engines currently offer the option to do full Boolean searching with the use of the logical operators. <br />More often simpler methods of constructing search statements are used, specifically, implied Boolean logic and search form terminology. <br />These methods are covered below.<br />
25. 25. 1. Full Boolean Logic with Logical Operators<br />Experiment by constructing searches using Boolean logical operators. Try some of the search statements shown on the following slides. Compare results from various search engines. <br />Keep in mind that the search engine might require that the Boolean operators be typed in CAPITAL LETTERS.<br />Most search engines provide help pages which explain the kind of searching the site performs.<br />
26. 26. 1. Full Boolean Logic with Logical Operators<br />Question: I need information about cats. <br />Boolean logic:OR<br />Search:catsORfelines<br />Question: I'm interested in dyslexia in adults. <br />Boolean logic:AND<br />Search:dyslexiaANDadults<br />Question: I'm interested in radiation, but not nuclear radiation. <br />Boolean logic:NOT<br />Search:radiationNOTnuclear<br />
27. 27. 1. Full Boolean Logic with Logical Operators<br />Question: I want to learn about cat behavior. <br />Boolean logic:AND, OR<br />Search:behavior catsORfelines<br />This example combines implied ANDlogic—designatedby the space between the word “behavior” and “cats”—with the use of the Boolean OR operator. The safest way to conduct this type of search is to use the advanced search page available on most search engine sites. This will be shown in option #3 below (search form terminology).<br />
28. 28. 2. Implied Boolean Logic with Keyword Searching<br />keyword searchingrefers to a search type in which one enters terms representing the concepts wished to retrieve. <br />Boolean operators are not used. <br />implied boolean logicrefers to a search in which symbols are used to represent Boolean logical operators, and is so common in Web search engines that it can be considered a de facto standard. <br />
29. 29. 2. Implied Boolean Logic with Keyword Searching<br />Question: I'm interested in radiation, but not nuclear radiation. <br />Boolean logic:NOT<br />Search:radiation  -nuclear<br />Notice the minus sign (-) in front of the word “nuclear.”<br />In this type of search, the absence of a symbol is also significant, as the space between keywords defaults to either OR logic or AND logic.<br />
30. 30. 2. Implied Boolean Logic with Keyword Searching<br />Question: I need information about cats. <br />Boolean logic:OR<br />Search: [None] <br />There are probably no general search engines on the Web that interpret the space between keywords as the Boolean OR. Rather, the space between keywords is interpreted as AND. <br />To do an OR search, choose either Full Boolean Logic(#1 above) or Search Form Terminology (#3 below).<br />
31. 31. 2. Implied Boolean Logic with Keyword Searching<br />Virtually all general search engines on the Internet default to AND logic. <br />Question: I'm interested in dyslexia in adults. <br />Boolean logic:AND<br />Search:dyslexia  +adults<br />or (and usually),<br />Search:dyslexia  adults (space implies AND)<br />
32. 32. 2. Implied Boolean Logic with Keyword Searching<br />Question: I want to learn about cat behavior. <br />Boolean logic:AND, OR<br />Search: [none]<br />As noted previously, a space between keywords implies AND; and generally, only use of full Boolean logic retrieves an OR search.<br />
33. 33. 3. Boolean Logic Using Search Form Terminology<br />Many search engines offer an advanced search page with a search form which allows the user to choose the Boolean operators from a menu. Usually the logical operator is expressed with substitute terminology rather than with the operator itself. <br />
34. 34. 3. Boolean Logic Using Search Form Terminology<br />Question: I need information about cats <br />Boolean logic:OR<br />Search:Each result must/should contain one, all, or a combination of subject keywords<br />Question: I'm interested in dyslexia in adults. <br />Boolean logic:AND<br />Search: Each result must/should contain both/all the subject keywords.<br />
35. 35. 3. Boolean Logic Using Search Form Terminology<br />Question: I'm interested in radiation, but not nuclear radiation. <br />Boolean logic:NOT<br />Search:Each result must not/should not contain any of the undesired keywords.<br />Question: I want to learn about cat behavior. <br />Boolean logic:AND, OR<br />Search:Each result must/should contain the specific combination of keywords, if search form allows multiple search logic. <br />
36. 36. Quick Comparison ChartFull Boolean vs. Implied Boolean vs. Search Form <br />
37. 37. Additional Resources<br />“Basic Search Tips and Advanced Boolean Explained.”<br />A two-page guide with examples prepared by Joe Barker.http://www.lib.berkeley.edu/TeachingLib/Guides/Internet/Boolean.pdf<br />“Using AND, OR, and NOT (Boolean Operators).” Mathewson-IGT Knowledge Center, University of Nevada, Reno.<br />An example of Boolean usage in a library online catalog. http://www.knowledgecenter.unr.edu/help/using/booltips.aspx<br />The Boolean Machine<br />A tool for visualizing the effects of Boolean operators on keyword searches, […] created to teach the importance of Boolean operators in effective search strategies” created by Rockwell Schrock. http://kathyschrock.netrbs3k/boolean<br />Boolify. <br />An online educational and practical tool for Internet searching using drag-and-drop graphic/visual interface rather than text/type. http://boolify.org/help.php<br />
38. 38. Credits<br />Slide 1 Image<br />Figure 5. Boolean network of phytohormone. The nodes and edges represent a Boolean Network constructed by VisANT.<br />© The Author(s) 2010. Published by Oxford University Press. http://nar.oxfordjournals.org/content/39/suppl_1/D1123.full<br />Slide 2 Quote<br />Proctor, Edward. "Boolean Operators and the Naïve End-User: Moving to AND." Online 26.4 (2002): 34. WilsonWeb. Web. http://www.onlinemag.net<br />Original Content & Images<br />Cohen, Laura. "Boolean Searching on the Internet." Internet Tutorials. Web. http://www.internettutorials.net/boolean.asp<br />Barker, Joe. “Basic Search Tips and Advanced Boolean Explained.” Web. http://www.lib.berkeley.edu/TeachingLib/Guides/Internet/Boolean.pdf<br />