Free scoping read. A written assessment of your manuscript in two business days, at no cost.

Start one
Contents

AcademyLiterature Review

Guide

Boolean Operators for Literature Searches: How to Build a Search String Step by Step (AND, OR, NOT, MeSH, Truncation)

How to combine AND, OR and NOT with subject headings, free-text synonyms, truncation and proximity, test the string and record it for PRISMA-S.

Dr. CharlieSenior Medical WriterPublishedReading time7 minutesSources9
  • Literature review
  • Search strategy
  • Boolean operators
  • PubMed

At a glanceLiterature Review

Within a concept
OR
Between concepts
AND
NOT
Avoid, or test it
Check
PRESS 2015 peer review

Explore literature review servicesDiscuss your project

Quick answer

  • Join synonyms with OR, join concepts with AND and avoid NOT.
  • Use a subject heading and free-text synonyms for every concept.
  • Rebuild the string for each database, test it on known studies and log it for PRISMA-S.

What each Boolean operator does

Boolean operators are the three words AND, OR, NOT, which combine search terms so a database returns the records you want1. The rule for literature searches is simple: OR within a concept, AND between concepts, and NOT almost never.

Table 1. What each Boolean operator does

OperatorEffectUse it for
ORBroadens: records with either termJoining synonyms inside one concept
ANDNarrows: records with both termsJoining different concepts
NOTExcludes every record containing a termRarely: it can remove relevant records

When a strategy is peer reviewed, the reviewer checks that operators are used correctly, that brackets nest properly and that NOT causes no unintended exclusions3.

Subject headings and free-text synonyms

MeSH (Medical Subject Headings) is the National Library of Medicine’s controlled vocabulary for indexing MEDLINE2. Subject headings gather records about a concept however the authors worded it, but new records may not be indexed yet. Free-text synonyms in titles and abstracts catch those records and concepts with no heading, so use both for every concept4.

A PubMed search applies automatic term mapping to untagged terms, matching them to MeSH, journals and authors1. Tag a term with a field, such as [tiab], and you control what it searches.

Truncation, phrases and proximity

  • Truncation finds word endings: in PubMed, smok* retrieves smoke, smoker and smoking1.
  • Phrase searching keeps words together, as in "type 2 diabetes".
  • Proximity operators find words within a set distance. PubMed supports proximity in the title, abstract and affiliation fields, written "term term"[tiab:~N]1; Ovid uses adjN6, Embase NEAR/n, Web of Science NEAR/x and Scopus W/n789. PRESS asks reviewers whether proximity or phrase searching would improve precision3.
  • Field tags and wildcards differ between platforms, so never paste syntax from one database into another untested.

Literature review and gap analysis support

Pubrica’s literature review team supports question framing, search design and peer review, screening, synthesis and gap statements. Authors remain accountable for the content and conclusions of their review, writing assistance is acknowledged in line with the ICMJE recommendations and GPP 2022, and Pubrica does not guarantee acceptance by any journal.

Build the search string step by step

Example question: do digital tools improve medication adherence in adults with type 2 diabetes?

  1. Split the question into concepts: type 2 diabetes, medication adherence, digital tools.
  2. List terms for each concept: a subject heading plus free-text synonyms and spelling variants.
  3. Join the terms inside each concept with OR, in brackets.
  4. Join the concept blocks with AND.
  5. Check the result: run each block alone, look at the counts and test the string against studies you know should appear.

Table 2. Example Boolean search string, built by concept block (PubMed syntax, illustrative)

Concept blockTerms joined with OR
Population"Diabetes Mellitus, Type 2"[Mesh] OR "type 2 diabetes"[tiab] OR "type II diabetes"[tiab] OR T2DM[tiab]
Outcome"Medication Adherence"[Mesh] OR adheren*[tiab] OR complian*[tiab]
Intervention"Telemedicine"[Mesh] OR mHealth[tiab] OR "mobile health"[tiab] OR smartphone*[tiab] OR "text messag*"[tiab]

The final Boolean search string is (Population) AND (Outcome) AND (Intervention). Each block stays in its own brackets so the OR terms are combined before the AND.

Common bracket error

Without brackets, a OR b AND c may not group the way you intend, because each database applies its own order of evaluation. Always bracket each OR group, then join the groups with AND.

The same search strategy on different platforms

The logic stays the same, but syntax changes. Subject headings, field tags and proximity operators are written differently on each platform, so rebuild and test the search strategy in each database rather than pasting it across4. Table 3 shows one concept in a PubMed search and in Ovid MEDLINE; Table 4 shows how platforms differ in proximity and in the order they evaluate operators16789, which is why unbracketed strings behave differently across databases.

Table 3. The same concept on different platforms (check each platform’s help pages before use)

ElementPubMedOvid MEDLINE
Subject heading, exploded"Medication Adherence"[Mesh]exp Medication Adherence/
Title and abstract wordsadheren*[tiab]adheren*.ti,ab.
Proximity"medication adherence"[tiab:~3](medication adj3 adheren*).ti,ab.
CombiningOne string, or #1 AND #2 in Advanced search historyBy line number: 1 and 2

Table 4. Proximity syntax and order of evaluation by platform

PlatformProximityOrder of evaluation
PubMed"term term"[tiab:~N] (ti, tiab, ad fields; no wildcards)Left to right; operators in capitals
Ovid MEDLINEadjN: up to N−1 words between, any orderBracket explicitly
Embase.comNEAR/n (any order), NEXT/n (fixed order)Left to right
Web of ScienceNEAR/x (default 15 words)NEAR, SAME, NOT, AND, then OR
ScopusW/n (any order), PRE/n (fixed order)OR, then W/n and PRE/n, then AND, then AND NOT

Test the string before you run it

  1. Known-item check: collect five to ten studies you know are relevant and confirm the string finds them.
  2. Block counts: run each concept alone; a block with very few or very many hits is a warning.
  3. Add one concept at a time and watch how the count falls with each AND.
  4. Read a sample of results for noise, then adjust the free-text terms.
  5. Ask for a peer review: a second searcher checks the strategy with the PRESS checklist before the final run3.

Why NOT is risky, and how to balance sensitivity

NOT removes every record containing the excluded term, even one that is also about your topic. Exclude “children” to focus on adults and you also lose studies of both. PRESS lists unintended exclusions from NOT as a specific check3; handle such cases at screening instead.

A sensitive string retrieves most relevant records plus many irrelevant ones; a precise string misses some. For a systematic review or other comprehensive literature review, favour sensitivity and accept more screening4. Every added AND concept narrows the results, so add one only when the question needs it.

When Boolean searching is not enough

A database string finds only what that database indexes. Supplement it with citation searching, trial registers such as the German Clinical Trials Register (DRKS) and grey literature sources4. If you plan to analyse retrieved full texts by machine, check the text and data mining rules first.

Record and review the search

Save the exact string for each database, the date it was run and the number of records. PRISMA-S asks authors to report full strategies, dates and record counts, and to describe any search peer review5. The search log is also the source of your flow counts.

Table 5. Checklist before you run the search

CheckDone
Each concept has subject headings (where the database has them) and free-text synonyms☐
Every OR group is bracketed, and groups are joined with AND☐
NOT is avoided, or tested for unintended exclusions☐
Truncation, phrases and proximity are tested in this database☐
The string finds your known relevant studies☐
A second searcher has reviewed it against PRESS 2015☐
The final string, date and record count are in the search log☐

Where this fits in the cluster

This guide is the hub of our literature review and gap analysis series. Start at the ten steps of a literature review, then use the guides below.

Table 6. The literature review and gap analysis cluster

GuideRead it for
Text and data mining rules (EU and Germany)The legal basis for machine analysis of full texts
PRESS checklistHow to peer review the string you built here
Steps in literature review flowchartWhere string-building sits among the ten stages
Literature review service Germany: FAQsScope, cost drivers and authorship before you commission support

Pubrica team verdict

A good search string is built one concept at a time, bracketed, tested on known studies and peer reviewed before it is run; everything else is syntax.

Frequently asked questions

OR broadens a search by accepting either term; AND narrows it by requiring both. Use OR between synonyms and AND between concepts.

Both. A subject heading finds indexed records however they are worded, and free text finds new or unindexed records.

It truncates a word so the search finds variant endings; in PubMed, smok* finds smoke, smoker and smoking.

It helps. The PRESS 2015 guideline is built for peer reviewing search strategies, and PRISMA-S asks you to report any search peer review.

Sources

Sources were checked on 5 November 2026. Requirements and guidance may change after that date; confirm the current version with the issuing body.

  1. 1National Library of Medicine. PubMed User Guide. Accessed 5 November 2026. https://pubmed.ncbi.nlm.nih.gov/help/
  2. 2National Library of Medicine. Medical Subject Headings (MeSH). Accessed 5 November 2026. https://www.nlm.nih.gov/mesh/meshhome.html
  3. 3McGowan J, Sampson M, Salzwedel DM, Cogo E, Foerster V, Lefebvre C. PRESS Peer Review of Electronic Search Strategies: 2015 guideline statement. J Clin Epidemiol. 2016;75:40-46. https://doi.org/10.1016/j.jclinepi.2016.01.021
  4. 4Lefebvre C, Glanville J, Briscoe S, et al. Chapter 4: Searching for and selecting studies. In: Higgins JPT, Thomas J, Chandler J, et al., eds. Cochrane Handbook for Systematic Reviews of Interventions. Cochrane. Accessed 5 November 2026. https://www.cochrane.org/authors/handbooks-and-manuals/handbook/current/chapter-04
  5. 5Rethlefsen ML, Kirtley S, Waffenschmidt S, et al. PRISMA-S: an extension to the PRISMA statement for reporting literature searches in systematic reviews. Syst Rev. 2021;10:39. https://doi.org/10.1186/s13643-020-01542-z
  6. 6Wolters Kluwer. Ovid MEDLINE database guide: searching tips and operators. Accessed 5 November 2026. https://tools.ovid.com/selfservice/medline.html
  7. 7Elsevier. Can I use Boolean operators, wildcards and proximity operators in Embase? Accessed 5 November 2026. https://www.elsevier.support/embase/answer/can-i-use-boolean-operators-wildcards-and-proximity-operators-in-embase
  8. 8Clarivate. Web of Science: search operators. Accessed 5 November 2026. https://webofscience.help.clarivate.com/Content/search-operators.html
  9. 9Elsevier. Scopus search tips. Accessed 5 November 2026. https://dev.elsevier.com/sc_search_tips.html

boolean operatorsliterature searchesliterature reviewAND OR NOTMeSHtruncation

How to cite this article

Pick your referencing style and copy it. Your university or target journal may vary the punctuation, so check its guide if it has one.

Dr. Charlie. (2026, November 5). Boolean Operators for Literature Searches: How to Build a Search String Step by Step (AND, OR, NOT, MeSH, Truncation). Pubrica. https://pubrica.com/academy/literature-review/boolean-operators-literature-searches/

This article is written to be learned from. Cite it if you are referring to what it says; if you are using the evidence behind it, cite the sources listed above instead.

Next steps

Literature review and gap analysis support

Pubrica’s literature review team supports question framing, search design and peer review, screening, synthesis and gap statements. Authors remain accountable for the content and conclusions of their review, writing assistance is acknowledged in line with the ICMJE recommendations and GPP 2022, and Pubrica does not guarantee acceptance by any journal.

This article is general information for researchers, not legal, regulatory or funding advice. Check the current requirements of your journal, funder, ethics committee or regulator before you act on it.

More in Literature Review

All of Academy

Get a free quote

Regulations

Check your project against this rule

  1. 1Your work
  2. 2Your details
  3. 3Send
What do you need?

Material you send is held under signed confidentiality, with access limited to the assigned team and encrypted transfer. It is not used to train anything and is not passed to third-party tools. Ask for the agreement before you send anything you would rather cover first.