1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

Discuss in my forum

Using Spotlight - Refining Spotlight Searches With Boolean Operators

Boolean Operators Can Help Narrow Your Search


Using Spotlight - Refining Spotlight Searches With Boolean Operators

To refine your searches, use AND, OR, and NOT.

Spotlight is the Mac’s built-in search service. You can use Spotlight to find just about anything stored on your Mac or any Macs on your home network.

Spotlight can find files by name, content, or metadata, such as date created, last modified, or file type. What may not be obvious is that Spotlight also supports the use of Boolean logic within a search phrase.

Using Boolean Logic in a Phrase

Start by accessing the Spotlight search service. You can do this by clicking on the Spotlight icon (a magnifying glass) in the menu bar at the top right of your screen. The Spotlight menu item will open and display a field for entering a search query.

Spotlight supports AND, OR, and NOT logical operators. The Boolean operators must be capitalized in order for Spotlight to recognize them as logical functions. Some examples include:

  • boot NOT camp will find any file whose name or content includes the word boot but does not contain the word camp.
  • boot AND camp will produce the same results as a search on boot camp because AND is the default operation when more than one word is included in a search. Even though AND is the default search type, there are explicit times when you may wish to use it, such as when searching for multiple phrases as in this next example.
  • “Now is the time” AND “Alanis Morissette” would return any file that contains both phrases, but would not return any file that only contains one of the phrases. Note the use of quotes to define a phrase.
  • boot OR camp will find any file that contains either word. You may see results that include references to hiking boots and a camping trip, as well as Apple’s Boot Camp.

Combining Boolean Terms

You can also combine logical operators within the same search query to produce complex search terms.

  1. About.com
  2. Technology
  3. Macs
  4. Using Your Mac
  5. Using Spotlight - Refining Spotlight Searches With Boolean Operators

©2014 About.com. All rights reserved.