Skip Navigation Bar
NLM Technical Bulletin

NLM Technical Bulletin 1997 Jul-Aug; 297



In This Issue:

TB on the Web

dot PubMed Search Hints

1998 Training Program

1998 Training Schedule

Training Request

Technical Notes


Current Issue

Home

Back Issues

Index

PubMed: Basic Boolean Search Hints

PubMed is a new NLM Web interface available at: http://www.ncbi.nlm.nih.gov/entrez/. As described in the cover story of the May-June 1997 Technical Bulletin, PubMed provides free access to MEDLINE (1966-current) and PREMEDLINE all in one database. This article, the first in a series of occasional articles, describes how to do Boolean searching in PubMed. The goal is to make the transition to PubMed a little easier for experienced ELHILL searchers. The hints below are an introduction to a whole new way of thinking about how to frame your search. Please remember that these hints represent just one way to accomplish a search and there are almost always alternative ways to do any strategy in PubMed. Future articles will explore some of the alternate methods and highlight other aspects of PubMed including unique features of the system. Also remember that PubMed is "a work in progress" and features may change as the system is enhanced.

Boolean Searching on PubMed

PubMed provides for Boolean searching. You may run a Boolean search from any search box, but the roomiest screen is available in Boolean Search. To reach the Boolean Search box: click on Advanced Search, and then Click on Boolean Search. All the information below is available to you in the Help screens including a full description of the Boolean Search features. Click on Help and Search Fields for a description of the fields that are available for searching and the abbreviations used for those field qualifiers. This article will not give a comprehensive list of all the search fields available in PubMed, because this information is available to you in Help and will be at your fingertips there, when and where you need it.

Boolean Operators MUST Be CAPITALIZED in PubMed

There are three Boolean Operators available to you in PubMed: AND, OR, NOT. The operators must be entered in capital letters (if spelled out) as shown here. If you type them in lower case, your search may still retrieve results, but all the lower case Boolean operators will be replaced with AND, which is the default Boolean operator.

Symbols for Boolean Operators

You may use the & (ampersand) in place of AND. A search formulation may contain both symbols and words to represent the Boolean operators, e.g., x & y OR z.

Field Designations MUST be in Square Brackets

If you are using the Boolean search screen, you must post qualify each term with a field designation that must be enclosed in square brackets [ ]. Pre-qualification of terms does not work. Field designations may be in upper or lower case, i.e., both heart [MH] and heart [mh] will retrieve the same citations. Parentheses are reserved for the nesting of Boolean operations as described in the next paragraph and may not be used with field qualifiers.

Using Parentheses to Create an Order of Operations

In PubMed there are no separate search statements to indicate the order of performance for the Boolean operations. Instead, parentheses are the indicators for which operations are performed in what order, e.g., (a OR b) & (c OR d) means that the OR operations inside the parentheses will be done before the AND operation between the two sets of terms. If there are no parentheses used in a search formulation, then the operations will be processed left to right.

MeSH Headings

Retrieving a Starred MeSH Heading

In the Boolean Search box, to retrieve a starred MeSH heading, e.g., *COLITIS, ULCERATIVE, you would type in colitis, ulcerative [majr]. This four-letter field designation stands for MeSH Major Topic and using this field qualifier alows you to retrieve starred MeSH headings.

Retrieving a MeSH Heading/Subheading Combination

To retrieve citations indexed with ANGIOPLASTY/AE, you would type in angioplasty/adverse effects [mh]. To retrieve citations indexed with *ANGIOPLASTY/AE, you would type in angioplasty/adverse effects [majr]. Subheadings must be spelled out in full when typed in.

Exploding a MeSH Heading

All MeSH Headings are automatically EXPLODEd, e.g., if you enter gingivitis [mh] you will automatically retrieve citations indexed with gingival pocket and gingivitis, necrotizing ulcerative, the two MeSH headings indented under gingivitis in the tree.

Limiting to a Specific Year

The year is indicated by four digits (the four digit designation is Year 2000 compliant) in the DP (Date of Publication) field, e.g., 1995 [dp]. There is no YR (Year) field in PubMed.

Limiting Your Search to English

To limit your search to English (or any other language), you must type in the full name of the language and post qualify with [la], e.g., english [la]. Three-character abbreviations for the language of the article are not valid search entries in PubMed.

No Documents Found

Beware the dread "No Documents Found" message; it probably means there is a mistake in the way you have entered your search terms. PubMed does not have the equivalent of a No Postings message that can be applied to a single term within your search; there is just this one all-purpose message that applies when your search fails to retrieve citations for any reason. All of the following searches will produce a "No Documents Found" message. If you see this message, please review your search strategy very carefully for one (or more) of the more commonplace errors shown in the table on page 5

Data Entry Mistakes that will result in a "No Documents Found" Message
angioplasty (mh)
  • Parentheses used instead of square brackets.
anbioplasty [mh]
  • Misspelled term.
[mh] angioplasty
  • Pre-qualification does not work; you must post qualify.
angioplasty [mh] or coronary artery bypass [mh]
  • Boolean OR is not capitalized. PubMed will replace "or" with AND.
angioplasty [mh] & eng [la]
  • English is not spelled out.
angioplasty [mh] & 95 [yr]
  • There is no YR field; the DP field must be used with a four digit year.

Sample Boolean Searches in PubMed

The above search formulations illustrate the features highlighted on page 4. Note that except for Boolean operators, which must be capitalized, all other terms and qualifiers may be upper or lower case.

Search Query

I am interested in articles in English on ulcerative colitis in cats and dogs.

PubMed Search Formulation

colitis, ulcerative [mh] & (cats [mh] OR
dogs [mh]) & english [la]

Note: Parentheses are used to indicate that the OR operation will be performed before the terms in the parentheses are ANDed with the other terms.

Search Query

I am interested in review articles on angioplasty published in the current year.

PubMed Search Formulation

angioplasty [majr] AND review [pt]
AND 1997 [dp]

Note: The MAJR qualifier is used to retrieve "angioplasty" as a Major MeSH topic (i.e., *ANGIOPLASTY) and DP takes the place of YR.

Training Available for PubMed Searching

Please check the training article and training schedule in this issue for class descriptions and schedules for the new classes being offered on Web-based searching in 1998.

--prepared by Toby Port
MEDLARS Management Section
Next article

Table of contents

Home

Index



U.S. National Library of Medicine, 8600 Rockville Pike, Bethesda, MD 20894
National Institutes of Health, Department of Health & Human Services
Copyright, Privacy, Accessibility, Viewers and Players
Freedom of Information Act (FOIA)
Last updated: 31 March 2005