You are here: Home » Customer service » Help with using OED Online » Advanced searching » Combining searches using Boolean operators
Search the site | Contact us
 
Help with using OED Online

Combining searches using Boolean operators

The Advanced search page contains three input boxes for search terms. Between the input boxes are two list boxes from which Boolean logical operations can be selected to combine search terms. There are three primary operators: AND, OR, and AND NOT. In addition, the operators NEAR and NOT NEAR are available.

AND Using this operator between search terms retrieves entries or quotations containing both terms.
OR Using this operator between search terms retrieves entries or quotations containing either of the terms.
AND NOT Using this operator between search terms retrieves entries or quotations containing the first term but not the second.
NEAR Using this operator between search terms retrieves entries or quotations containing the first term within a certain number of words of the second, or containing both terms anywhere in the same section of an entry. See below for details of options relating to this operator.
NOT NEAR Using this operator between search terms retrieves entries or quotations in which the first term occurs, and in which the second term does not occur within a certain number of words of the first. See below for details of options relating to this operator.

These operators give you the ability to retrieve entries or quotations containing two or more terms in different search areas. For an example, see combining terms in different search areas.

NEAR/NOT NEAR searching

A panel to the right of the Advanced search form allows you to set the proximity required for a NEAR or NOT NEAR search. This works in the same way as proximity searching from the Full Text search panel, with a list box to select the level of proximity and radio buttons to choose whether the first search term should appear before, after, or before or after the second.

Image of proximity search panel

When the option Entries is selected from the tab at the top of the Advanced search form, NEAR and NOT NEAR only operate within a single search area, e.g. definitions. When one of these operators is used between two search terms, the same search area must be selected for both terms.

When the option Quotations is selected, any available combination of search areas can be used.

The operation NEAR (or NOT NEAR) is always performed first in a search, overriding the selected order of operations.

Matching terms in the same section of an entry

To match two or more search terms in the same quotation, the Quotations tab should be selected. For example, the following search retrieves quotations from The Times published in the 1960s:

Image of Advanced search panel with Quotations tab selected and the search 'times' in quotation work AND '1960-1969' in quotation date

To match two or more search terms in the same definition or etymology, the operation NEAR should be used, with the proximity set to section. For example, the following search retrieves entries containing the words bird and australia in the same definition section.

Image of Advanced search panel containing the search 'bird' in definitions NEAR 'australia' in definitions, with the proximity set to 'within the same section'

If the AND operation had been used instead, entries (e.g. ant-eater) would have been matched in which the words bird and australia appeared in different definition sections.

Multiple search terms

When more than one Boolean operator is used, the search engine by default performs the operations in the order in which they are written. For example:

Image of Advanced search panel containing the search 'bird' OR 'mammal' AND 'australia' in definitions

This search retrieves entries in which bird or mammal occurs in the definition, and in which australia occurs. In other words, the search is bracketed as (bird OR mammal) AND australia, which states that the operation ‘OR’ is to be performed first.

You can override this default ordering by selecting the order you want from the panel to the right of the Advanced search form.

The two Boolean operators in the search form are labelled Operation A and Operation B. The order of operations panel contains a list box with the default ordering, A before B, selected.

Image of order of operations panel, with 'B before A' selected

In the example above, choosing to perform operation B before operation A will bracket the search as bird OR (mammal AND australia), and the search will match entries in which bird occurs, or in which both mammal and australia occur.

Help text index:

A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z