See the little magnifying-glass icon () in your menu bar? That’s the mouse-driven way to open the Spotlight search box.
The other way is to press -space bar. If you can memorize only one keystroke on your Mac, that’s the one to learn. It works both at the desktop and in other programs.
In any case, the Spotlight text box appears just below your menu bar (Figure 4-1). Feel free to drag it around your screen.
As soon as you begin typing what you’re looking for, a list of results appears below the search box. This is a live, interactive search; that is, Spotlight modifies the menu of search results as you type.
Tip
You can make this results window taller—drag downward on its bottom edge—or move it around the screen (drag its top bar). Bonus tip: To restore the Spotlight window to its original size and position, hold the cursor down on the icon at the top of your screen.
As you’d expect, Spotlight can round up anything with an icon on your Mac. Any file, folder, program, picture, movie, PDF document, music file, Microsoft Office document, and even font, regardless of its name or folder location. Spotlight can also find things according to their file types (type .doc to find Word files), download source (type cnet.com to find programs you downloaded from that site), sender (a name or email address), or Finder tag (Tip).
In the Spotlight search box, you can type part of its name or some text that appears inside the document you want. For example, if you’re trying to find a file called Pokémon Fantasy League.doc, typing just pok or leag would probably suffice. (The search box doesn’t find text in the middles of words, though; it searches from the beginnings of words.)
Spotlight also finds matching information within your Mac programs: every email message, Contacts entry, calendar appointment, web bookmark, System Preferences panel, To Do item, chat transcript, dictionary definition, and website in your History list. Spotlight can even find photos according to who is in them (using the Faces feature in Photos) or where they were taken (using its Places feature). If you use Messages (Chapter 20), Spotlight also finds the lucky members of your buddies lists.
Tip
The Spotlight menu is a full-blown English dictionary, too. Or, more specifically, it’s wired directly into macOS’s own dictionary, which sits in your Applications folder.
So if you type a word—say, myrmecophile—into the search box, you see the Dictionary definition in the results. Click it to see the full-blown entry in the preview pane. (In this example, that would be: “n: an invertebrate or plant that has a symbiotic relationship with ants.”)
You can also type out, in plain English, a description of files you’re trying to find. You can use any combination of file types (documents, movies, images, presentations, email), dates and times (2017, last year, this week, last month, in February), the names of email senders or recipients (simon jary, halle franklin), plus the words and phrases inside each file.
In other words, you can search for things like these: files I worked on last week, slides from 2016 containing EduMotion, images from last year, messages from Xerxes, photos of tia, files I created yesterday, emails from Bob last year that contain documents, or the presentation that I was working on yesterday.
Tip
If you install Flashlight, a free Spotlight extender, you can expand Spotlight’s understanding of natural-language searches. You can type things like remind me to buy soap on Monday (creates a new item in your Reminders program) or text Nicki: don’t forget to pick up Casey! to send a new text message. (You can get Flashlight from this book’s “Missing CD” page at www.missingmanuals.com.)
Spotlight is also a Google wannabe. It can bring back results from the web for all kinds of common information, saving you the trouble of opening up your web browser and doing a search.
You’ll often find, for example, a Wikipedia entry in the results, or Twitter results, along with matches from the App Store, the iTunes music/movie/TV store, the Maps app’s database of restaurants and businesses, movies currently playing, and so on. Here are the kinds of things it knows about:
General information. Spotlight uses Microsoft’s Bing search engine to provide lists of general web links it thinks you’ll find useful. The beauty of Spotlight is that, often, you get the answers you need right in the Spotlight box, without having to venture any further afield on the web.
Movies. Spotlight has a cozy relationship with Fandango.com, the movies database. When you type the name of a movie, past or present, the preview panel shows you a handy dossier about that flick: its year of release, genre, rating (like PG-13 or R), its rating by viewers (like four stars), run time (hours and minutes long), plot summary, cast and crew lists, and even a button or two that open up your web browser to play the movie’s trailer (Figure 4-2).
Tip
For recent movies, you see the critical rating from RottenTomatoes.com, a popular movie-rating site. This rating is expressed as a percentage (like 66 percent, meaning that’s how many people liked the movie), as well as with icons. The red tomato indicates a good movie (over 60 percent liked it); the green splatter means a bad one.
Music. Spotlight can find a song in your own iTunes music collection. Type the name of a performer, album, or song to find it.
Restaurants, businesses, points of interest. Spotlight is hooked into macOS’s Maps program and everything it knows about the world. You can quickly look up landmarks like empire state building or washington monument, business names like home depot, and business categories like sushi, pizza, or gas station.
In each case, the preview pane shows you a snippet of the map of that location, plus handy buttons like Directions to Here, Directions from Here, Add to Favorites, and Add to Contacts. Most of these buttons hand you off to the Maps app to complete the task. (Spotlight finds only the biggest-name businesses. It can’t find addresses, coordinates, or smaller companies.)
If you search for the name of a nearby restaurant, the results include driving directions, photos, hours of operation, TripAdvisor reviews, and contact information.
Stocks. Type a stock abbreviation (AAPL or NFLX) or a wordier phrase (Microsoft stock) to see an info panel of its current price, its rise or fall today, and its 52-week high and low.
Weather. Need an instant forecast? Type “weather” plus the city name (weather boston).
Tweets and hashtags. You can type Twitter hashtags to see the latest tweets. (A hashtag is a searchable keyword preceded by a # symbol, like #firstworldproblems or #StanleyCup.) When you search for one, Spotlight shows you a few matching tweets—a great way to find out what’s happening in the world.
Sports scores, standings, and info. Spotlight is the world’s most smug sports know-it-all; see Figure 4-3.
The iTunes store. Want to know if Apple sells or rents a certain movie or TV show? Want a quick way to find that Angry Birds game you’ve heard about? Use Spotlight. It searches Apple’s online stores without your having to open the App Store app or your iTunes program. (Only the biggest names show up in these searches; Spotlight doesn’t search the entire app, music, or movie store.)
Web videos. Spotlight can find a video from YouTube or Vimeo. You have to include the word YouTube, Vimeo, or video as part of your search (funny kitten video or golf fail YouTube). You generally get only a single result, and you can’t actually play the video in the Spotlight box, so it’s not as handy as it could be.
Yes, Spotlight is great for searching your Mac and the Internet. But it also has a third skill: It can do math for you.
Get into the habit of hitting -space when you have a quick question about any of the following:
Calculations. Spotlight is a tiny pocket calculator, always at the ready. Press -space, type or paste 38*48.2-7+55, and marvel at the first result in the Spotlight menu: 1879.6. There’s your answer—and you didn’t even have to fire up the Calculator.
(Use the asterisk, *, to mean “times” and the slash, /, as “divided by.”)
And Spotlight is not just a four-function calculator, either. It works with square roots: Type sqrt(25), and you’ll get the answer 5. It also works with functions like log(x), exp(x), sin(x), sinh(x), and e. You can even type pi to represent, you know, pi.
You can copy the result to the Clipboard by pressing -C, so that you can paste it into another program.
Conversions. This handy feature (see Figure 4-4) converts units of measurement for you. It converts time, temperature, mass (weight), length, and even currency.
Usually, you don’t have to type anything more than the amount you want to convert; Spotlight instantly converts it to the five most likely other units. For example, if you type 338 feet, the preview pane shows you the same distance in meters, yards, inches, centimeters, and millimeters.
Figure 4-4. Spotlight is a units-conversion mastermind. If you simply type a quantity (without saying what you want it converted to), Spotlight displays five different conversions.
But what if what you really wanted was to know how many miles that is? Just keep typing. If you type 338 feet in miles, you get the answer: 0.064 miles.
In the same way, you can convert volume (teaspoons, tablespoons, cups, pints, quarts, gallons, cubic feet, fluid ounces, centiliters, milliliters, liters, cubic feet, cubic inches, cubic meters); weight and mass (pounds, ounces, kilograms, grams, milligrams, short tons, metric tonnes, long tons); area (acres, hectares, square feet, square yards, square meters, square kilometers); temperature (Fahrenheit, Celsius, Kelvin—you can abbreviate F, C, or K); force (joules, calories, foot-pounds, newton meters, British thermal units); or power (watts, kilowatts, BTUs per minute). And those are just a few examples.
If you have an Internet connection, you can even convert currencies. Type 134 euros, for example, and you’ll find out that that’s $150.40 in U.S. dollars—a lot for a hamburger. (The preview pane also offers the same figure in British pounds, Japanese yen, Canadian dollars, and Swiss francs. If you want a different unit, say so. Type 134 euros in yuan, for example, to find out how much that’s worth in China.
Spotlight’s window is divided in half. The left side is the list of results.
On the right, though, is a preview pane that shows what’s in each result. When you click an item in the results list—or use the arrow keys to walk down that list—the preview pane bursts to life, presenting a visual display of that result (Figure 4-1).
Plenty of times, your quest for information ends with a glance at the preview pane. If you were hoping to find a dictionary definition, a phone number, an email address, a unit conversion, the address of a business from Maps, or the rating or plot summary of a current movie, for example, that information is now attractively arrayed before you. No need to open anything from here.
In the same way, you can grab yourself a Quick Look preview of what’s inside a document. That is, you can see the actual photo when you highlight a JPEG file’s name, or you can read the actual text when you highlight a Word document’s name.
If you’re using Spotlight to find and open an app or a document, double-click it to open it. Or use the arrow keys to walk down the menu, and then press Return to open the one you want.
If you click an application, it opens. If you select a System Preferences panel, System Preferences opens to that panel. If you choose an appointment, the Calendar program opens, already set to the appropriate day and time. Selecting an email message opens that message in Mail or Outlook. And so on.
Spotlight is so fast that it eliminates a lot of the folders-in-folders business that’s a side effect of modern computing. Why burrow around in folders when you can open any file or program with a couple of keystrokes?
Tip
You can drag icons right out of the results list. For example, you can drag one onto the desktop to park it there, into a window or a folder to move it, into the Trash to delete it, onto the AirDrop icon (in the Sidebar) to hand it over to a colleague, to another disk icon to back it up, and so on.
It should be no surprise that a feature as important as Spotlight comes loaded with options, tips, and tricks. Here it is—the official, unexpurgated Spotlight Tip-O-Rama:
You may wonder why Spotlight bothers to display, in big gray lettering, the name of each item you highlight in the results list. It’s because sometimes the item’s name doesn’t match your search term. You might search for kumquats, for example, and find it inside a file called “Frank’s Favorite Fruits.” The lettering tells you the document name.
The same sort of thing happens when you see a website’s name in the results. The results list might show the “.com” name for the site (like Amazon.com), and the gray lettering might say “Top Sellers in Electronics.”
If the very first item—labeled Top Hit—is the icon you were looking for, then press Return to open it. This is a huge deal, because it means that in most cases, you can perform the entire operation without ever taking your hands off the keyboard.
To open Safari in a hurry, for example, press -space bar (to open the Spotlight search box), type safa, and hit Return, all in rapid-fire sequence, without even looking. Presto: Safari is before you.
And what, exactly, is the Top Hit? MacOS chooses it based on its relevance (the importance of your search term inside that item) and timeliness (when you last opened it).
Tip
Spotlight makes a spectacular application launcher. That’s because Job One for Spotlight is to display the names of matching programs in the results menu. Their names appear in the list nearly instantly—long before Spotlight has built the rest of the menu of search results.
If some program on your hard drive doesn’t have a Dock icon, for example—or even if it does—there’s no faster way to open it than to use Spotlight.
To find out where something is on your hard drive—that is, to see its folder path (Power Users’ Clinic: The Go to Folder Command)—-click its name. The folder path appears at the bottom of the preview pane (Figure 4-5).
To jump to (highlight) a search result’s Finder icon instead of opening it, -double-click its name. Or arrow-key your way to the result’s name and then press -Return, or just -R. (If it’s information from a program, like an email message, calendar appointment, or address-book entry, then it opens in Mail, Calendar, or Contacts instead.)
Spotlight’s menu shows you, at most, a couple dozen of the most likely suspects, evenly divided among the categories (Documents, Applications, and so on). To see the complete list, you have to open the Spotlight Searching window (Tip). Scroll to the bottom of the list and double-click “Show all in Finder.”
It’s easy to open something in the results list from the keyboard. Just press (or ) to jump from category to category. Once you’ve highlighted the first result in a category, you can walk through the remaining four by pressing the arrow key by itself. Then, once you’ve highlighted what you want, press Return to open it.
In other words, you can get to anything in the Spotlight menu with only a few keystrokes.
The Esc key (top-left corner of your keyboard) offers a two-stage “back out of this” method. Tap it once to close the Spotlight menu and erase what you’ve typed, so that you’re all ready to type in something different. Tap Esc a second time to close the Spotlight text box entirely, having given up on the whole idea of searching. (If you’ve managed to lose your Esc key, then -period and -Delete do the same thing.)
You can drag things out of the results—either to the desktop, where it becomes an icon, or onto an app’s icon on the Dock to open it. For example, you might drag a JPEG graphic from the results list directly onto the Dock icon for Photoshop Elements to open it with that program (instead of whatever program would have opened when you double-clicked the result).
Think of Spotlight as your little black book. When you need to look up a number in Contacts, don’t bother opening Contacts; it’s faster to use Spotlight. You can type somebody’s name or even part of someone’s phone number.
Among a million other things, Spotlight tracks the keywords, descriptions, faces, and places you’ve applied to your pictures in Photos. As a result, you can find, open, or insert any photo at any time, no matter what program you’re using, just by using the Spotlight box at the top of every Open File dialog box! This is a great way to insert a photo into an outgoing email message, a presentation, or a web page you’re designing. The photo program doesn’t even have to be running.
Spotlight is also a quick way to adjust one of your Mac’s preference settings. Instead of opening the System Preferences program, type the first few letters of, say, volume or network or clock into Spotlight. The Spotlight menu lists the appropriate System Preferences panel, so you can jump directly to it.
When something is selected in the results list, you can press -L to open your browser and do a web search for it.
Spotlight’s menu lists only a couple of dozen found items. In the following pages, you’ll learn about how to see the rest of the stuff. But, for now, note that you can eliminate some of the categories that show up here (like PDF files or bookmarks), and even rearrange them, to permit more of the other kinds of things to enjoy those limited seats of honor. Details are in Tip.
Spotlight shows you only the matches from your account and the public areas of the Mac (like the System, Application, and Developer folders)—but not what’s in anyone else’s Home folder. If you were hoping to search your spouse’s email for phrases like “meet you at midnight,” forget it.
If Spotlight finds a different version of something on each of two hard drives, it lets you know by displaying a faint gray hard drive name after each item in the menu.
Spotlight works by storing an index—a private, multimegabyte Dewey Decimal System—on each hard drive, disk partition, or USB flash (memory) drive. If you have some oddball type of disk, like a hard drive that’s been formatted for Windows, Spotlight doesn’t ordinarily index it—but you can turn on indexing by using the File→Get Info command on that drive’s icon.
Most people just type the words they’re looking for into the Spotlight box. But if that’s all you type, you’re missing a lot of the power of this feature.
If you type more than one word, Spotlight works just the way Google does. That is, it finds things that contain both words somewhere inside.
But if you’re searching for a phrase where the words really belong together, put quotes around them. You’ll save yourself from having to wade through hundreds of results where the words appear separately.
For example, searching for military intelligence rounds up documents that contain those two words, but not necessarily side by side. Searching for “military intelligence” finds documents that contain that exact phrase. (Insert your own political joke here.)
You can confine your search to certain categories using a simple code. For example, to find all photos, type kind:image. If you’re looking for a presentation document but you’re not sure whether you used Keynote, iWork, or PowerPoint to create it, type kind:presentation into the box. And so on.
Here’s the complete list of kinds. Remember to precede each keyword type with kind and a colon.
To find this: | Use one of these keywords: |
A program | app, application, applications |
Someone in your address book | contact, contacts |
A folder or disk | folder, folders |
A message in Mail | email, emails, mail message, mail messages |
A Calendar appointment | event, events |
A Calendar task | to do, to dos, todo, todos |
A graphic | image, images |
A movie | movie, movies |
A music file | music |
An audio file | audio |
A PDF file | pdf, pdfs |
A System Preferences control | preferences, system preferences |
A Safari bookmark | bookmark, bookmarks |
A font | font, fonts |
A presentation (PowerPoint, iWork) | presentation, presentations |
You can combine these codes with the text you’re seeking, too. For example, if you’re pretty sure you had a photo called “Naked Mole Rat,” you could cut directly to it by typing mole kind:images or kind:images mole (the order doesn’t matter).
You can use a similar code to restrict the search by chronology. If you type date:yesterday, then Spotlight limits its hunt to items you last opened yesterday.
Here’s the complete list of date keywords you can use: this year, this month, this week, yesterday, today, tomorrow, next week, next month, next year. (The last four items are useful only for finding upcoming Calendar appointments. Even Spotlight can’t show you files you haven’t created yet.)
Round up everything with a certain Finder tag (Tip) using “tag:” as the search prefix. For example, to find everything on your computer that you’ve tagged as Important, you’d search for tag:important.
If your brain is already on the verge of exploding, now might be a good time to take a break.
These days, you can limit Spotlight searches by any of the 175 different info-morsels that may be stored as part of the files on your Mac: author, audio bit rate, city, composer, camera model, pixel width, and so on. Note has a complete discussion of these so-called metadata types. (Metadata means “data about the data”—that is, descriptive info-bites about the files themselves.)
author:casey. Finds all documents with “casey” in the Author field. (This presumes that you’ve actually entered the name Casey into the document’s Author box. Microsoft Word, for example, has a place to store this information.)
width:800. Finds all graphics that are 800 pixels wide.
flash:1. Finds all photos that were taken with the camera’s flash on. (To find photos taken with the flash off, you’d type flash:0. A number of the yes/no criteria work this way: Use 1 for yes, 0 for no.)
modified:3/7/16-3/10/16. Finds all documents modified between March 7 and March 10, 2016. You can also type created:6/1/16 to find all the files you created on June 1, 2016. Type modified:<=3/9/16 to find all documents you edited on or before March 9, 2016.
As you can see, three range-finding symbols are available for your queries: <, >, and - (hyphen). The < means “before” or “less than”; the > means “after” or “greater than”; and the hyphen indicates a range (of dates, sizes, or whatever).
Tip
Here again, you can string words together. To find all PDFs you opened today, use date:today kind:PDF. And if you’re looking for a PDF document you created on July 4, 2016, containing the word “wombat,” you can type created:7/4/16 kind:pdf wombat—although, at this point, you’re not saving all that much time.
Now, those examples are just a few representative searches out of the dozens that macOS makes available. To see the complete list of searchable metadata options, choose Other in the Spotlight Searching window, as described in Tip. You’ll probably be stunned and amused by the tweakiness of the things you can search for. (Altitude? Tempo? Year recorded? Due date?)
What comp sci professors call Boolean searches are terms that round up results containing either of two search terms, both search terms, or one term but not another.
To go Boolean, you’re supposed to incorporate terms like AND, OR, or NOT into your search queries.
For example, you can round up a list of files that match two terms by typing, say, vacation AND kids. (That’s also how you’d find documents coauthored by two people—you and a pal, for example. You’d search for author:Casey AND author:Chris. Yes, you have to type Boolean terms in all capitals.)
Tip
You can use parentheses instead of AND, if you like. That is, typing (vacation kids) finds documents that contain both words, not necessarily together. But the truth is, Spotlight runs an AND search whenever you type two terms, like vacation kids—neither parentheses nor AND is required.
If you use OR, you can find items that match either of two search criteria. Typing kind:jpeg OR kind:pdf turns up photos and PDF files in a single list.
The minus sign (hyphen) works, too. If you did a search for dolphins, hoping to turn up sea-mammal documents, but instead find your results contaminated by football-team listings, then by all means repeat the search with dolphins -miami. MacOS eliminates all documents containing “Miami.”
Get macOS Sierra: The Missing Manual now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.