03 · What You Need to Know
How Boolean Logic Changes the Records Your Search Can Retrieve
Boolean Operators Work With Sets of Records
The easiest way to understand Boolean searching is to stop thinking of AND, OR, and NOT as ordinary English words.
Imagine that every search term produces a set of database records. A search for adolescents produces one set. A search for social media produces another. Boolean operators determine how those sets are combined.
| Operator |
What It Requires |
Typical Effect |
| AND |
Records must satisfy both connected search sets. |
Usually reduces the number of results. |
| OR |
Records may satisfy either or both connected search sets. |
Usually increases the number of results. |
| NOT |
Records satisfying the excluded set are removed from the first set. |
Usually reduces the number of results, with a risk of excluding relevant records. |
This set-based interpretation is more reliable than remembering slogans such as "AND means narrow" and "OR means broad." Those slogans describe the usual numerical effect, but the underlying logic explains why it happens.
AND Means the Concepts Must Meet
Suppose you want research concerning social media among adolescents.
Because a record now has to satisfy an additional requirement, AND usually makes a search smaller. Cochrane describes AND as combining different concepts so that terms from all included concepts need to be represented for records to be retrieved.
AND is therefore commonly used to connect the major concepts of a research question.
Adding More ANDs Usually Makes the Search More Restrictive
Suppose your question concerns social media, adolescents, and sleep:
Every additional AND introduces another condition. This can improve precision when the added concept is necessary and reliably represented in searchable records. It can also damage sensitivity when the concept is inconsistently mentioned or indexed.
This is why a search strategy should not automatically contain every element of the research question. Current Cochrane guidance notes that searching every aspect of a review question may be unnecessary or undesirable because some concepts, such as outcomes or comparators, may not be well represented in titles, abstracts, or controlled vocabulary.
OR Means Any of the Alternatives Can Qualify
OR behaves differently. It is usually used to gather alternative ways of representing one concept.
Suppose researchers use both adolescents and teenagers:
OR therefore usually increases retrieval. The database retains the records retrieved by the first term and adds records that can be retrieved through the second term.
This is why synonyms, spelling variants, acronyms, subject headings, and other alternative representations of the same concept are commonly combined with OR.
OR Does Not Mean the Terms Must Be Exact Synonyms
Search terms within an OR group do not need to be dictionary synonyms. They need to be legitimate alternative routes to the concept you intend to retrieve.
For example, one concept may be represented through a preferred subject heading, several free-text synonyms, an acronym, and a spelling variant. Those terms differ linguistically but may all contribute useful access to substantially the same search concept.
The important boundary is conceptual. Adding a broader or neighboring concept with OR does more than increase vocabulary coverage; it changes what can qualify for retrieval.
This is why the work of finding different terms for the same concept must come before mechanically joining everything with OR.
OR Is Particularly Important for Keywords and Subject Headings
Suppose you are searching a biomedical concept using both a MeSH heading and free-text terminology. These are different retrieval routes, but they may represent the same conceptual element of your question.
A simplified structure might look like:
This is one reason subject headings and keywords are commonly used together rather than requiring a record to satisfy both routes simultaneously.
AND and OR Usually Work at Different Levels of the Search
A useful literature search often has two levels of logic.
Within a concept, OR gathers alternative terminology. Between concepts, AND requires the different ideas to intersect.
Suppose your research question concerns the relationship between social media use and sleep among adolescents. A simplified strategy could be conceptualized as:
This pattern is widely used in systematic searching. Cochrane's current guidance recommends gathering a broad set of terms for each included concept, combining terms within concepts using OR, and then combining the concept sets using AND.
Think in Concept Blocks Rather Than Long Strings of Words
Once a search contains several concepts and several synonyms, reading it from left to right becomes difficult. Concept blocks make the logic visible.
For example:
Concept A: Online learning "online learning" OR e-learning OR "online education"
Concept B: University students "university students" OR "college students" OR undergraduates
Combine the concepts (Concept A) AND (Concept B)
The first block says that any appropriate expression of online learning can satisfy that concept. The second does the same for the student population. AND then requires a record to satisfy both conceptual blocks.
This way of thinking also makes it easier to diagnose a poor search. If results are too broad or too narrow, you can examine which concept block is responsible rather than randomly adding or deleting terms.
Parentheses Become Important When AND and OR Appear Together
Consider this search:
online learning OR e-learning AND students
What exactly should the database combine first?
Search systems use rules for evaluating Boolean expressions, and those rules can affect the resulting set. Parentheses allow you to state explicitly which terms belong together:
("online learning" OR e-learning) AND students
Now the intention is clear: either expression can satisfy the online-learning concept, and that concept must then intersect with students.
The mechanics of grouping deserve particular attention once searches become more complicated. Understanding how parentheses change a database search prevents the search engine from having to infer a grouping you could have stated explicitly.
NOT Removes an Entire Set of Records
NOT is the operator most likely to be misunderstood.
Suppose you search:
This may sound straightforward, but notice what NOT does not ask. It does not ask whether adolescents are the main topic. It does not ask whether the study population consists exclusively of adolescents. It simply removes records that match the excluded search expression according to the fields and logic used.
NOT Can Remove Relevant Mixed-Population or Comparative Studies
Suppose you want research on depression in adults and decide to exclude adolescents:
depression AND adults NOT adolescents
A highly relevant article comparing depression among adults and adolescents may contain both population terms. Because it satisfies the excluded adolescent condition, NOT may remove it even though it contains the adult evidence you wanted.
This is why Cochrane advises avoiding NOT where possible in systematic searches. The danger is not that the operator malfunctions. It is that it works exactly as instructed while your conceptual intention is more nuanced than the exclusion rule.
Watch Out
NOT does not understand why an excluded term appears in a record. If a relevant article also contains that term, the entire record can disappear from your results. Use exclusion logic only after testing what relevant material it removes.
The risks of exclusion become important enough to warrant their own search decision. Before using NOT to clean up a noisy result set, consider when NOT can accidentally remove relevant research.
Boolean Operators Do Not Understand Meaning
Boolean logic operates on whatever the database considers a match. It does not interpret the scientific relationship among the concepts in the way a human reader would.
If you search teachers AND burnout, the database can identify records satisfying the two search expressions. That does not necessarily mean every retrieved study investigates burnout among teachers. One term might describe the study population while the other appears in background text, a comparison group, an author keyword, or another searchable field.
AND establishes co-retrieval, not necessarily a semantic relationship.
This is one reason field searching and, where supported, proximity searching can become useful. If merely requiring both words somewhere in a record produces too much noise, proximity searching can sometimes express the intended relationship more precisely than AND.
Boolean Logic Works With Whatever Search Fields You Give It
The effect of an operator also depends on where its terms are searched.
A query requiring two terms in titles is much more restrictive than requiring those same terms somewhere across broader searchable fields. Likewise, a subject-heading set combined with a Title/Abstract keyword set is not equivalent to two unrestricted keyword searches.
Boolean operators therefore do not replace decisions about whether terms should be searched in titles, abstracts, keywords, or other fields. They combine the sets those field-specific searches create.
Some Databases Insert AND Automatically
You may already be using Boolean logic without typing an operator.
PubMed, for example, currently applies AND between concepts entered without an explicit Boolean operator. Its documentation gives the example that a search containing vitamin c common cold is translated conceptually as vitamin c AND common cold.
Automatic behavior varies among search systems. Some platforms may interpret spaces differently, offer menu-based Boolean controls, or apply relevance algorithms that make a simple search box behave differently from an advanced database interface.
For a deliberate and reproducible strategy, do not rely on assumptions about invisible operators. Check the documentation of the database and interface you are using.
Boolean Syntax Is Not Identical Across Every Search System
The logical concepts of AND, OR, and NOT are widely used, but syntax and implementation are not perfectly universal.
PubMed instructs users to enter Boolean operators in uppercase. Other databases may have their own conventions, precedence rules, limits, or interfaces for combining search sets. Web search engines may support only parts of traditional Boolean logic or interpret it differently.
This is one reason the same search syntax does not work in every research database. Preserve the conceptual logic when moving between systems, but verify how the destination platform expresses it.
The Number of Results Can Help You Check Whether Your Logic Makes Sense
Result counts are not evidence that a search is correct, but unexpected counts can expose logical errors.
If A retrieves 2,000 records and B retrieves 3,000, then A AND B should not normally produce more than either individual set because the intersection must come from records belonging to both. A OR B should normally be at least as large as either individual set because it contains records from both sets, with duplicates counted only once in the combined result.
If your results behave very differently from what the logic suggests, investigate the query translation, automatic mapping, field restrictions, grouping, or syntax. PubMed's Advanced Search tools, for example, allow searchers to compare result counts and inspect how queries were translated.
Boolean Logic Cannot Tell You Whether Your Concepts Are Well Chosen
A technically correct Boolean expression can still be a poor search.
You can combine the wrong concepts perfectly. You can OR together terms that are not truly alternative representations. You can AND a concept that relevant articles rarely mention. You can exclude a population that appears in mixed-population studies you actually need.
Boolean operators execute your conceptual decisions; they do not validate them.
This is why search development remains iterative. Run the search, inspect relevant and irrelevant results, identify what the logic is doing, and refine it without quietly changing the question the search is supposed to represent.