Macworld (USA)

Don’t take Spotlight for granted

Tips and tricks to help you find what you need on your Mac.

- BY JASON SNELL

It’s hard to believe that it’s been almost 15 years since Apple first announced Spotlight as a banner feature of Mac OS X Tiger ( go.macworld.com/tger). In fact, Spotlight has been around so long that I suspect that most Mac users take it

for granted, not entirely understand­ing just how broad its purview is and how powerful it can be at finding the stuff that’s on your Mac. Whole books could be (and have been) written about Spotlight, but let me take you through a few details that you

may have never learned.

MORE TO THE SEARCH BAR

Spotlight is a search engine that runs on your Mac. In the background, the Spotlight metadata engine is scanning new and changed files on your computer—and it’s not just looking for the names of your files, but is cataloging informatio­n about their contents. Spotlight indexes the text of every document it can find, and knows details about the compressio­n formats of video files, the focal length of a digital photo, and much more.

The most common ways to search an entire Mac with Spotlight are either through the menu bar item ( go.macworld. com/spmn)— the magnifying glass, which you can activate by typing CommandSpa­ce—or by searching in a Finder window. If you keep it simple, just typing the name of the file or app you’re looking for, Spotlight will give you want. In recent years Apple has worked to speed up the initial Spotlight search results so it’s easy to use Spotlight to quickly launch pretty much any app on your Mac ( go.macworld. com/look).

But there’s a lot more you can do with Spotlight ( go.macworld.com/m0re). You can type words or phrases from inside documents, and it’ll find them. To find exact phrases, add quotation marks around them. You can even use NOT and OR (in capital letters) to limit searches.

One of my most common searches is to search for an image with a specific phrase in its name. This is relatively easy to do in the Finder, via the Find command (Command-f). As you start typing a phrase in a Finder window’s search box, a dropdown menu will suggest options to apply to your query. I’ll type a search term like logo and the menu will suggest “Name matches: logo”. By selecting that option, I’m kicking off a search for files with the word “logo” in the name. But I’m not done. Once I’ve selected that search term, I type the word “image,” and the Finder offers up several different filters—all images or specific image formats. I choose Kinds: Image from the drop-down menu, and all of a

sudden I’m searching only for image files with the word “logo” in their filename. It’s fast and convenient.

By default, the Finder limits searches to the current folder you’re in, but you can click the This Mac button in the toolbar of the Finder window to expand the search to your entire Mac. (If you prefer to start with a search of the entire Mac, go to Finder: Preference­s, click the Advanced tab, and change When Performing a Search to “Search This Mac.”)

The Finder window can also be a powerful multi-query search tool itself ( go. macworld.com/advn). Below the Search toolbar, you’ll see a default search term of “Kind is Any.” You can modify this term to specify a file type (like Image), or change it to an entirely different term. This is a great way to search for files in a specific date range, by using the “Created date” field. And underneath the Other… option is a vast galaxy of different metadata types you can search on, including camera data like flash and focal length.

NOT JUST THE FINDER

What you might not know is that other apps take advantage of Spotlight, too. Searching for text in a PDF in Preview, for example, uses the Spotlight index of your PDF. Mail’s search is based on searching individual­ly downloaded email messages within a hidden folder. (Which is why you can also use Spotlight to find Mail messages, incidental­ly.)

This can lead to some quirky behavior, including something a friend ran into the other week. He was searching for text in a bunch of PDFS from within Preview, and coming up empty—even though he knew the text he was searching for was there. The fix turned out to be a pretty obscure one: I had him open the Spotlight pane of System Preference­s, click on the Privacy tab, and drag his folder full of PDFS into the tab. Then I had him remove the folder and wait a moment for Spotlight to re-index all the files in that folder.

This solved the problem. When in doubt, adding a folder to the Privacy tab (which is, of course, also useful if there are items you never want to show up in

Spotlight searches) is a quick way of erasing Spotlight’s index of a particular corner of your Mac. When you remove the disk folder from the Privacy tab, Spotlight cranks up its background processes and re-indexes everything. You’d be surprised how often this is the way to solve a frustratin­g series of failed searches.

I’ve also found Spotlight a helpful companion for files I store on cloud services. Since Dropbox works by syncing my files to my Mac, Spotlight will index them and make them searchable just as it would any other file. But because I also use Google Drive for some documents, I’ve installed Google Backup and Sync, an app that “syncs” my Google Drive with my Mac.

I used sarcastic quotes in that previous sentence because Google doesn’t really download the contents of Google Docs and Google Sheets onto my Mac. Instead, it downloads empty files that have the names of my cloud documents, and when I click on them, the real documents open in my web browser. Because the real text of the documents doesn’t reside on my drive, I can’t search within them—but I can still search on their filenames. I use search all the time to open up Google Docs and Google Sheets files directly.

BEYOND SPOTLIGHT

Spotlight is a powerful database of files, but Apple’s attention to the Spotlight interface is, er, spotty. If you really want to take control of your file searching on macos, it’s worth considerin­g the $34 utility Houdahspot ( go. macworld.com/houd), recently updated to version 5.0. Houdahspot offers a flexible, friendly front-end to searching the Spotlight database. If I’m being honest, Houdahspot is the Spotlight interface that would be built into macos if Apple had continuall­y improved Spotlight over the last decade and a half… but it hasn’t.

This week John Voorhees at Macstories had a good overview of Houdahspot 5 ( go.macworld.com/hod5), which is worth a read. If you find yourself getting frustrated by the limitation­s of Apple’s Spotlight interface, Houdahspot will make you feel a lot calmer. ■

 ??  ??
 ??  ?? You can generate complex search queries quickly from a Finder window.
You can generate complex search queries quickly from a Finder window.
 ??  ?? Drag a folder into Spotlight’s Privacy pane to delete its index, then remove it to force a re-index.
Drag a folder into Spotlight’s Privacy pane to delete its index, then remove it to force a re-index.
 ??  ?? Houdahspot 5 adds a powerful and flexible interface on top of the Spotlight database.
Houdahspot 5 adds a powerful and flexible interface on top of the Spotlight database.

Newspapers in English

Newspapers from Australia