Spotlight

Mastering Spotlight Searches in Mac

Spotlight is the revolutionary search technology built into OS X and it works fairly well out of the box, but with these tricks and tips, you can master the spotlight searches.

You access it by clicking the magnifying glass icon in the menu bar or by pressing the ⌘ key and spacebar.

Spotlight creates an index of practically everything on your hard drive—including email messages, contacts, and even Calendar events—and it uses this index to Search your hard drive.

If you’re looking for a specific file or folder, the last thing you want to do is wake through email messages in the search results. Fortunately, you can improve the Spotlight by prioritizing search results and turning off some document categories when you perform a search.

Turning off document categories do not change the Spotlight’s index.
Only the displayed results are modified—Spotlight’s index is changed

Here’s how to deactivate Spotlight document categories:

  1. From the Apple menu, select System Preferences.
  2. Select Spotlight.
  3. Deselect categories to prevent these types of files from appearing in the search results.
  4. Drag categories up and down the list to prioritize the search results. Categories at the top of the list appear first in the results.


Spotlight

The next time you perform a search with Spotlight, you’ll have to sort through fewer search results. Just remember that you’ll need to reselect categories in System Preferences if you ever want to search for files in different categories.

Hiding Dictionary and Calculator Results

You can’t disable the dictionary and calculator search results in System Preferences, but you can manually hide those results if you don’t want to see them. Just open the Terminal application and type the following:

defaults write com.apple.spotlight DictionaryLookupEnabled NO

Press RETURN and then type the following:

defaults write com.apple.spotlight CalculationEnabled NO

Press RETURN again and then restart your computer. From now on, all of the dictionary and calculator search results will be hidden when you perform a search with Spotlight.

To start showing the dictionary and calculator search results again, type
the same commands but replace the NO at the end of the commands with YES.

Spotlight Search Operators

Limiting search categories and prioritizing results effectively focuses Spotlight searches, but it’s a lot of work to open System Preferences every time you want to limit Spotlight’s categories for one search. A better idea is to use search operators.

These prefixes tell Spotlight to use a single search category or metadata variable for your current search.

To search for documents… Use
In a specific category kind:audio, kind:email, kind:folder, kind:word, etc.
Created by a specific author author:name
Created or modified on or within
specific dates
date:today, created:12/14/11-12/25/11,
modified:
With Boolean operators “my new mac”, Matt AND
Emily, apple NOT Microsoft

Rebuilding Spotlight’s Index

Spotlight performs searches by parsing through an index of all the files and folders on local hard drives connected to your computer. OS X is supposed to update this index in real-time when you create or modify files or folders, but problems occasionally crop up.

Spotlight won’t work correctly if this index is incomplete or corrupted. When search results don’t appear as expected, it’s probably time to manually rebuild the Spotlight’s index.

Here’s how to rebuild the Spotlight’s index:

  1. From the Apple menu, select System Preferences.
  2. Select Spotlight.
  3. Click Privacy.
  4. Click the + button.
  5. Select a hard disk or volume.
  6. Click the button. Spotlight rebuilds the index of the selected hard disk or
    volume

Spotlight Index

Rebuilding the Index Using the Command Line

You can also use the command line to rebuild the Spotlight’s index. Open the Terminal application and enter sudo mdutil -E / Authenticate with your administrator password, and a message appears indicating that the index will be rebuilt. Spotlight rebuilds the index of your hard disk. You can track the rebuilding progress by clicking the Spotlight menu.


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *