Skip to Main Content

PubMed (EN): 4. Building a query

Building block method

On the previous pages we explained how to search with MeSH-terms and how to search in the title and abstract of an article. We placed these as separate queries in the search history. To connect the MeSH-terms and title/abstract-terms we make use of the so called 'building block method'. Through this method your full query will come to look like the example below. 

Element 1: ([MeSH-term] OR [Title/Abstract-termen])


Element 2:   ([MeSH-term] OR [Title/Abstract-termen])


Element 3: ([MeSH-term] OR [Title/Abstract-termen])


Element 4: ([MeSH-term] OR [Title/Abstract-termen])

By building a query in this way you make sure that the articles you find contain something from each element, either a MeSH-term or Title/abstract term. You can either build the query directly in PubMed or first write it in word. Whichever method you prefer, it is wise to periodically save your queries by copying the search history table and pasting it in Word. After closing the PubMed window the website erases your search history.

Building a query in PubMed

The easiest and safest way to connect MeSH-terms and title/abstract terms that belong to the same element is to first place both the MeSH-terms and the title/abstract terms in the search history. To find instructions on how to do this please review step 2 and 3. By adding terms to the 'Query box' and clicking 'Search' or 'Add to history' terms will automically appear in the search history.

When all terms are present in the search history, retrieve the terms that belong to the same element and place them in the query box by clicking the 3 dots under 'Actions'. If the query box is empty you can select  'add query'. To also add the other terms from your search history that belong to this element, again click on the three dots and select  'Add with OR'. After combining the MeSH-terms and title/abstract terms in the query box, again press 'Search' or 'Add to history'. The complete element is now added to the search history. Repeat this process for the other elements. Remember which search history entry belongs to which element. 

If all elements are present in the search history it is time to connect these using AND. Click on the three dots beside the search history entry that contains the first element and again select  'Add query'. To also add the other elements to the query again click on the three dots and select  'Add with AND'. The new element is now connected with AND to the element that was present in the query box. To also add the other elements, again select the three dots and select 'Add with AND'.

The benefit of this method is that the brackets are automatically placed in the right positions, meaning you don't have to place these manually in the query box. A frequent mistake is placing brackets in an incorrect fashion, which leads to a lot of strange search results. 

Building a query in Word

In Microsoft word you can also easily build a query using the following steps:

  1. Place all the title/abstract terms that belong to the same element and connect these with OR;
  2. Place [square brackets] behind each of the terms with tiab inbetween: [tiab]. Connect the square brackets without a space in between.
  3. Copy the MeSH-terms from PubMed and place [square brackets] behind them with MeSH inbetween: [MeSH]. Again connect these without a space in between.
  4. Connect the terms that belong to the same element by placing OR in between them. This time make sure you do leave a space between the separate terms.
  5. Repeat this process for the other elements.
  6. Place each element in your search history and connect them with AND by selecting 'Add query' and 'Add with AND'.

The benefit of typing your query in Word is that your search is immediately saved. The downside is that you are typing more yourself, which is more prone to errors. Therefore make sure that you typed all the terms correctly.

Note that we still do not place the (brackets) ourselves, but let PubMed place these for us by retrieving elements from the search history. This way you can easily avoid mistakes in bracket placement. It is also easier to add new terms to the elements. 

Example of a PubMed Query

Below you can find an example of a search string that consists of the following elements:

E1: C. elegans

E2: Ageing

E3: Berries

E4: Eating


((Caenorhabditis elegans[Title/Abstract] OR "C. elegans"[Title/Abstract] OR nematod*[Title/Abstract] OR roundworm*[Title/Abstract] OR secernent*[Title/Abstract]) OR ("Nematoda"[Mesh]))


((Aging[Title/Abstract] OR ageing[Title/Abstract]) OR ("Aging"[Mesh]))


((Fruit[Title/Abstract] OR Berry[Title/Abstract] OR Berries[Title/Abstract] OR Plant aril[Title/Abstract]) OR ("Fruit"[Mesh]))


((Intake*[Title/Abstract] OR consum*[Title/Abstract] OR eating[Title/Abstract]) OR ("Eating"[Mesh]))


(Brackets) are used to indicate which operator needs to be used first. The two search strings below will lead to different results due to the different bracket-placement:

(Epistaxis OR Nosebleed) AND Emulsion

Epistaxis OR (Nosebleed AND Emulsion)

The first search string sill lead to articles that contain at least one of the words 'Epistaxis' or 'Nosebleed', and in addition contain the term 'emulsion'. The second string will lead to articles that either contain the term epistaxis, or to articles that contain both the terms Nosebleed and Emulsion. 

Brackets are most often used to indicate that the operator OR needs to be used first, because it connects the different elements. When building a search string by retrieving items from the search history step by step, PubMed automatically places the brackets in a correct way. This way you don't have to place brackets yourself and you avoid the chance of making mistakes.