Boolean Operators for Database Searching: A Practical Guide
Boolean operators are the grammar of database searching. Used well, they let you build a search that captures everything relevant and almost nothing else. Used badly, they return either seven results or seven hundred thousand. This guide covers the three core operators, the supporting operators every reviewer should know, and the syntax quirks that separate the major databases.
The three core operators
AND narrows a search. It returns records that contain all the joined terms. Use it between concepts: mindfulness AND anxiety AND students.
OR broadens a search. It returns records that contain any of the joined terms. Use it within a concept to capture synonyms: teenager OR adolescent OR "young person".
NOT excludes a term. It removes records containing the excluded term. Use it sparingly — animal NOT human will drop a paper on human-animal bonding that you probably wanted to keep.
Mnemonic: AND narrows, OR opens, NOT knocks out.
Parentheses are not optional
Databases evaluate operators left-to-right by default, which produces unexpected results. Use parentheses to group concepts:
- Wrong: mindfulness AND anxiety OR stress (returns everything about stress plus mindfulness+anxiety)
- Right: mindfulness AND (anxiety OR stress) (returns studies about mindfulness that mention either anxiety or stress)
Build every search with explicit parentheses. Reviewers and librarians will thank you.
Truncation and wildcards
Truncation catches word endings. The usual symbol is an asterisk:
- student* returns student, students, studentship
- nurs* returns nurse, nurses, nursing
Be careful with short roots: cat* returns cat, cats, but also category, catalog, catastrophe.
Wildcards replace single characters. Often a question mark:
- wom?n returns woman and women
- behavio?r returns behavior and behaviour
Syntax varies. See our search strategy guide for database specifics.
Phrase searching
Quotation marks force exact phrase matching:
- "randomized controlled trial" will not match "randomized and controlled trial"
- "literature review" will not match "review of the literature"
Use phrases for terms that are conventionally fixed. Do not phrase every keyword — "stress reduction" excludes "reducing stress," which you may want.
Proximity and adjacency operators
Proximity operators find words near each other. They are powerful and underused. Syntax varies:
- PubMed: no native proximity in 2024 default syntax; use phrases
- Ovid: mindfulness ADJ3 anxiety (within 3 words, any order)
- Scopus/Embase: mindfulness W/3 anxiety or PRE/3
- EBSCO (CINAHL, PsycINFO): mindfulness N3 anxiety
Adjacency catches natural-language variations that AND misses. Mindfulness AND anxiety returns a paper that mentions mindfulness on page 2 and anxiety on page 40; mindfulness N3 anxiety returns papers where the concepts are actually connected.
Field tags
Field tags restrict where the database looks. Common fields:
- Title (TI)
- Abstract (AB)
- Author keywords (KW)
- Subject headings (MeSH/MH/DE)
Searching mindfulness[ti] AND anxiety[ti] returns papers where both terms appear in the title — a very precise search. Searching title/abstract/keywords balances precision and recall.
Combining free text and controlled vocabulary
Every concept in a health review should combine both:
- Free text: (mindfulness OR "mindful awareness" OR MBSR)
- MeSH: "Mindfulness"[Mesh]
Then OR the two together:
((mindfulness OR "mindful awareness" OR MBSR) OR "Mindfulness"[Mesh])
See our MeSH terms post for PubMed specifics.
Database-specific syntax cheat sheet
| Feature | PubMed | Scopus | CINAHL/EBSCO | Ovid |
|---|---|---|---|---|
| Truncation | * | * | * | $ or * |
| Wildcard | n/a | ? | ? (single), # (optional) | ? |
| Phrase | "..." | "..." | "..." | "..." |
| Proximity | limited | W/n, PRE/n | Nn, Wn | ADJn |
| Subject heading | [Mesh] | n/a | MH "..." | .sh or / |
A worked example
Question: Does mindfulness-based stress reduction reduce anxiety in undergraduate students?
PubMed strategy:
("Mindfulness"[Mesh] OR mindfulness[tiab] OR MBSR[tiab] OR "mindful awareness"[tiab])
AND
("Anxiety"[Mesh] OR anxiety[tiab] OR anxious[tiab])
AND
("Students"[Mesh] OR undergrad*[tiab] OR "college student*"[tiab] OR "university student*"[tiab])
This strategy combines controlled vocabulary with free text, uses truncation where safe, scopes the free-text search to title and abstract (tiab), and organizes concepts into clear Boolean blocks.
Five Boolean mistakes to avoid
- Mixing operators without parentheses
- Over-using NOT and silently dropping relevant records
- Truncating too aggressively (sub* returns submarine, sublimation...)
- Forgetting to translate syntax between databases
- Searching only MeSH (misses recent un-indexed records) or only free text (misses old indexed records)
Boolean logic is mechanical once you practice. Run the same concept in three databases this week; you will internalize the syntax faster than any tutorial can teach it.