Searching Using Keywords and Boolean Logic – Boolean Operators: Controlling Your Search with Sequencing and Nesting

Remember your elementary school lessons in mathematics? Whether you enjoyed it or not, you all had to learn how to solve compound mathematical equations (you know, the ones with brackets, additions, divisions and subtractions).

Well, if you had a good math teacher, he or she would have introduced the "BEDMAS” technique. That is, you would have been taught to solve compound math equations one step at a time in the following order:

Don't worry, the mathematics ends here! This was only an example intended to highlight the importance of sequencing within a search operation.

When constructing "search-strings” using keywords, connectors, and operators, you can employ similar logic to properly tailor your search.

By default, both Westlaw and Quicklaw perform Boolean operations in the following order:

However, you can alter the default search sequence and effectively "control” the order in which your search is carried out. This common technique is colloquially referred to as "nesting”.

(Nesting Techniques)

Nesting refers to the use of parentheses to ensure that the search engine conducts the Boolean operation in a particular order.

Consider, for example, the following search string:

crime AND youth OR teenager OR adolescent

This search will yield documents containing both "crime” and "youth”, but it will also yield documents containing the words "teenager” and/or "adolescent”, regardless of whether they discuss crime or not.

Thus, this Boolean operation may well retrieve results that talk about teen pregnancy, adolescent angst, or teenage fashion.


EXAMPLE: crime AND youth OR teenager OR adolescent
nesting 1

As you can see, without a nesting technique the search engine is going to retrieve documents that include the words "teenager” and "adolescent” regardless of whether they also include the word "crime”!

You can avoid these extraneous results by using nesting techniques.  To do so, you must simply insert parentheses into the equation.


EXAMPLE: crime AND (youth OR teenager OR adolescent)
nesting 2

By using a nesting technique, the search engine will only retrieve documents that contain the words "crime” and "youth”, "crime” and "teenager”, or "crime” and "adolescent”.  So, by using a nesting technique, you've eliminated a large number of irrelevant results!

The !Truncation! Operator

Imagine you need to locate cases or legislation that deal with prostitution. By using the TRUNCATION operator, you can effectively search for the keywords "prostitute”, "prostitutes”, and "prostitution” at once.

To use the TRUNCATION operator, simply place it after the "root” of the word.  The search engine will locate documents containing the indicated root regardless of the ending variations among the words.

EXAMPLE: "prostitu!
  • This keyword will retrieve documents containing the words, "prostitute”, "prostitutes”, and "prostitution”
CAVEAT: As a rule, make sure you only use the TRUNCATION operator when the root of the word is sufficiently unique.
  • For example, if you are searching for cases on the legal status of infants, the truncated search keyword "infant!” will retrieve documents containing the words: "infant”, "infantile”, "infanticide”, "infantry”, and "infantrymen” among others...
  • Put simply, you should always consider the results of using a particular truncated keyword before doing so!

The *Wildcard* Operator

The WILDCARD operator is commonly used to account for alternate spellings of a word.

For example, the term "marijuana” is often spelled "marihuana” as well. In such a context, you can use the WILDCARD operator to account for the variation.

EXAMPLE: "mari*uana”
  • This keyword will locate documents containing both spellings of the word marijuana.
  • Similarly, if you are unsure about the spelling of an author's name (i.e. Bernstein or Bernstien), then using the keyword "bernst**n” will retrieve documents written by both Bernstein and Bernstien.

You can also use multiple WILDCARD operators at the end of a keyword as a modified truncation operator.

EXAMPLE: if you are searching for material on the legal status of infants, but do not want to read about light infantry or infantrymen, try using the keywords "infan**AND "infant***”. 
  • This search will retrieve documents containing the words "infants”, and "infantile” without also yielding documents on infantrymen.
NOTE: the WILDCARD operator only replaces one character.
  • For example, the keyword "f*tus” will locate documents containing the word "fetus”, but will not locate documents containing the alternate spelling of "foetus”.
  • Pay attention to this when using the WILDCARD operator; in some cases it is better to simply include both spellings of a word in your search string (i.e. fetus OR foetus).

The "Phrase" Operator

If you need to search for a specific phrase, then place the words or phrase within "quotation marks”.

EXAMPLE: "false! imprison!
  • This will locate documents containing the phrase "false imprisonment” and "falsely imprisoned”, but it will not yield documents containing the phrase "imprisoned falsely”.

The /Proximity/ Operators

The PROXIMITY operators (/n, /p, and /s) let you search for documents that contain two or more keywords within a specified proximity of each other.

Words within a Paragraph: /p

EXAMPLE: "constitutional right” /p property
  • This search will locate documents that contain the words "constitutional right” and "property” within the same paragraph.

Words within a Sentence: /s

Words within a # of Words: /n

The "/n” operator is used to specify a desired proximity.

EXAMPLE: substance /5 abuse
  • This will retrieve documents that contain the words "substance” AND "abuse” within five words of each other.
    • i.e. "substance abuse”, "abuse of a prohibited substance”, "substance and alcohol abuse”, and "substance and drug abuse”.


The PROXIMITY operators are especially helpful when you are trying to narrow your search for relevant cases.