Section 2.13. Finding Files 1: Spotlight

2.13. Finding Files 1: Spotlight

Every computer offers a way to find files. Moreover, every computer offers a way to open files you've found. In Windows, the Search program achieves both tasks in a reasonably fast manner.

On Mac OS X, though, there's something even better. Spotlight, Apple's search technology, is designed to make searching so fast, efficient, and automatic that it reduces much of what you've read on the preceding pages to irrelevance.

That may sound like breathless hype, but wait until you try it.

2.13.1. The Spotlight Menu

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 at the desktop, but also when you're working in any other program.

In any case, the Spotlight text box appears just below your menu bar.

Begin typing to identify what you want to find and open. For example, if you're trying to find a file called Pokmon Fantasy League.doc , typing just pok or leag would probably suffice.

As you type, a menu immediately appears below the search box, listing everything Spotlight can find containing what you've typed so far. This is a live, interactive search; that is, Spotlight modifies the menu of search results as you type .

The menu lists every file, folder, program, email message, address book entry, calendar appointment, picture, movie, PDF document, music file, Web bookmark, Microsoft Office (Word, PowerPoint, Excel) document, System Preferences pane, and even font that contains what you typed, regardless of its name or folder location.


Note: Spotlight isn't just searching the names of your files and folders. It's actually searching their contents the words inside your documents, for example. Technically speaking, Spotlight searches all your files' metadata , which is data about data: descriptive text information about what's in a file, like its height, width, size , creator, copyright holder, title, editor, created date, and last modification date. It also includes anything you've typed in the Spotlight Comments field of an icon's Get Info window.

If you see the icon you were hoping to dig up, click it to open it. Or use the arrow keys to "walk down" the menu, and then press Return or Enter to open the icon.


Tip: If you -click something in the results menu (or highlight something from the keyboard and then press -Enter), you jump to that item's icon, wherever it may be on your hard drive. That's a very handy trick when your purpose in finding something is, say, to trash it, copy it, label it, or back it up, rather than opening it.

If you open an application, well, that program pops onto the screen. If you open a System Preferences pane, System Preferences opens and presents that pane. If you choose an appointment, the iCal program opens, already set to the appropriate day and time. Selecting an email message opens that message in Mail. And so on.

Figure 2-21. Top: Press -Space, or click the magnifying glass icon, to make the search bar appear.
Bottom: As you type, Spotlight builds the list of every match it can find, neatly organized by type: programs, documents, folders, images, PDF documents, and so on. You can redefine the keystroke, which folders are "peeked into," and which categories appear here (and in which order) in System Preferences' Spotlight pane.


As you'll soon learn, Spotlight isn't just a fast Find command. It's an enhancement that's so deep, convenient and powerful, it threatens to make all that folders-in-folders business nearly pointless. Why burrow around in folders when you can open any file or program with a couple of keystrokes?

2.13.2. The Spotlight Window

As you may have noticed, the Spotlight menu doesn't list every match on your hard drive. Unless you own one of those extremely rare, 60-inch Apple Skyscraper Displays, there just isn't room.

Instead, Spotlight uses some fancy behind-the-scenes analysis to calculate and display the 20 most likely matches for what you typed. But at the top of the menu, you usually see that there are many other possible matches; it says something like "Show All (423)," meaning that there are 423 other candidates.

2.13.2.1. Spotlight window from the Spotlight menu

If, indeed, the Spotlight menuits Most Likely to Succeed listdoesn't include what you're looking for, click Show All (or just press Return or Enter). You've just opened the Spotlight window , shown in Figure 2-22.

Now you have access to the complete list of matches, neatly organized by category. (Even this view starts out showing only the top five matches in each category. If there's more to see, click the link that says "145 more" beneath the list.)

2.13.2.2. Opening the Spotlight window directly

Choosing Show All from the Spotlight menu is one way to open the Spotlight window. But if you want to open the Spotlight window directly , using the Spotlight menu is a bit roundabout, since Mac OS X has to repeat your search all over again in the new window.

UP TO SPEED
Why Spotlight Isn't Windows Indexing Service

When certain crusty Windows fans hear about Spotlight, their first reaction runs along these lines: "We've had that in Windows for years ," they say. "It's called Indexing Service."

But the truth is, Windows Indexing Service isn't even in the same league as Spotlight.

Indexing Service can indeed search inside the words of your documents, including Microsoft Office files and various kinds of text files.

But it's not integrated into the operating system, the way Spotlight is. For example, Indexing Service is harder to get to, even if you know how to turn it on; it isn't available from within any program, either. You can't open it with a keystroke. It doesn't search your address book, email, or calendar. Above all, Indexing Service updates its internal database of what's on your hard drives at regular intervals, but it's not real-time. Spotlight, on the other hand, properly catalogs your system every time you create, save, move, copy, or delete a file. With Spotlight, search results reflect the up-to-the-second contents of your hard drive.

A much closer relative to Spotlight is Google Desktop Search, an add-on that creates a system-wide search box (and a keystroke that puts your cursor there), just like Spotlight. It doesn't search as many kinds of documents as Spotlight, and it's not as deeply integrated into the operating system (for example, it doesn't show up in the Open and Save boxes, as Spotlight does). But it's a very nice start.


Instead, press the keystroke for opening the Spotlight window. It's Option- -Space bar, but you can change this keystroke to just about anything you like. (See Section 2.13.2.7.)

When the Spotlight window opens, you can start typing whatever you're looking for into the Search box at the upper right.

Figure 2-22. You can open this window either by choosing Show All from the Spotlight menu, or by pressing Option- -Space bar at any time. (You can change this keystroke, if you like, in the Spotlight pane of System Preferences.


As you typeor, more realistically , a second or two after you type each letterthe window changes to reveal, item by item, a list of the files and folders whose names contain what you typed.


Tip: If you're not sure about the spelling of the word you're typing, type as much as you know, and then hit Option-Escape. Mac OS X obligingly drops down its list of Every Word It Knows That Begins With Those Letters in a huge, scrolling menu!If you've typed decon , for example, you'll see correctly spelled items for decongest, decongestant , and so on. You can click one to make it fill in the Search box.

While the searching is going on, a sprocket icon whirls away in the upper-left corner of the window. If a search is taking a long time, you're free to switch into another program while Spotlight keeps working in the background.

To cancel the search in progress, click the X button next to the phrase you typed (or press Escape). That button clears the box so you can type a different word or phrase.

2.13.2.3. Expand or collapse the list

Once you're looking at the search results, the Spotlight window may look clean and simple. But it's actually crawling with fun activities for the whole family.

For example, the flippy triangles next to each category (Documents, Images, and so on) are buttons . Clicking one hides or shows that category list. If you're looking for a photograph, you may as well collapse all the other headings to leave more room on your screen.


Tip: If you Option -click one of the flippy triangles, you collapse or expand all of the headings at once.

You can perform another sort of expansion, too: If you see "40 more" at the bottom of a category list, click that phrase to expand the list so that you're seeing all matching items in that category. To return to the original, Top Five Only view, click the words "Show top 5" in the blue category-header bar.

At the right side of the Spotlight window, you'll find a skinny command panel with headings like "Group by," "Sort Within Group by," and so on. These are your tickets to grouping and sorting the list of found stuff. (Figure 2-23 shows the difference between grouping and sorting.) Your options are Kind (folders, PDF, images, documents, and so on); Name (an alphabetical list); date ( the date you last opened it , not the date you last made a change); People (authors of Microsoft Office documents, for example); and Flat List (no grouping at all.)

UP TO SPEED
What Spotlight Knows

The beauty of Spotlight is that it doesn't just find files whose names match what you've typed. That would be so 2004!

No, Spotlight actually looks inside the files. It can actually read and search the contents of text files, RTF and PDF documents, and documents from AppleWorks, Keynote, Pages, Photoshop, and Microsoft Office (Word, Excel, and PowerPoint).

As time goes on, software companies will develop bits of add-on softwareplug-insthat make their documents searchable by Spotlight, too. Check in periodically at, for example, www.apple.com/downloads/macosx/spotlight, to look for Spotlight plug-ins relevant to the kind of work you do. (Within a week of Tiger's release, for example, you could download free Spotlight plug-ins for OmniGraffle, OmniOutliner, TypeIt4Me, MacDraft, REALBasic, Painter, Wolfram Notebook, and others.)

But that's only the beginning. Spotlight searches not only the text you've typed, but also over 115 other bits of dataa staggering collection of information including the names of the layers in a Photoshop document, the tempo of an MP3 file, the shutter speed of a digital-camera photo, a movie's copyright holder, a document's page size, and on and on.

Technically, this sort of secondary information is called metadata . It's usually invisible, although a lot of it shows up in the Get Info dialog box described earlier in this chapter.

You might think that typing something into the Spotlight bar triggers a search. But to be technically correct, Spotlight has already done its searching. In the first 15 to 30 minutes after you install Tigeror in the minutes after you attach a new hard driveSpotlight invisibly collected information about everything on your hard drive. Like a kid cramming for an exam, it read, took notes on, and memorized the contents of all your files. (During this time, the Spotlight icon in the menu bar pulses ; if you click it, you'll be told that Spotlight is indexing the drives.) Once it has indexed your hard drive in this way, Spotlight can produce search results in seconds.

After that initial indexing process, Spotlight continues to monitor what's on your hard drive, indexing new and changed files in the background, in the microseconds between your keystrokes and clicks in other programs.


Figure 2-23. You can sort the master list by group, which is indicated by the blue horizontal dividers . Then within each group, you can sort by another criterion. Here, for example, are some search results grouped by Date and sorted by Kind (left), and then the same results grouped by Person and sorted by Name (right).


2.13.2.4. See the pretty pictures

When you've grouped your results by Kind, the blue divider bars for Images and PDF Documents offer some useful little buttons at the right end. Figure 2-24 shows what they do.

2.13.2.5. Get more info

Click the button to the right of anything in the list to expand its listing. A sort of Get Info panel drops down, identifying where the item is on your hard drive and listing its authors, size, creation and modification dates, "last opened" date, dimensions (for graphics and PDF documents), duration (for music and movies), sender (for mail messages), date (for iCal appointments), and so on.

2.13.2.6. Filter the list

Filtering , in this case, means winnowing down hiding some of the results so that you see only the good stuff. That's the purpose of the "When" and "Where" controls on the right side of the screen.

  • When . If you click the Today link, for example, Spotlight cuts down the list so that you see only items you've opened today. Click This Week to see only items you've opened this week, and so on. (Click Any Date to restore the full list.)

    Figure 2-24. You can view groups of PDF documents either in a list, just like other documents, or as thumbnails, as shown here. Photos and other graphics files offer even more fun; you can view them as a list, as thumbnails, or as a full-screen slideshow.


  • Where . These links let you restrict the listing to what's on your Home folder (click Home) or your main, internal hard drive (click Macintosh HD or whatever your drive is called). Click Computer to restore the full list of everything on all your drives.

2.13.2.7. Work with results

Most of the time, what people do with the results of a Spotlight search is open them . You find something, you open it.

But there are other things you can do with your search results. Try Control-clicking or right-clicking something in the list (or a highlighted group of somethings) to see a very useful little shortcut menu of options.


Tip: Everything in the Spotlight window is kind of like a regular Finder icon. You can work with anything as though you're looking at one big list view: Drag something to the Trash, drag something to the desktop (to move it there), drag something onto a Dock icon to open it with a certain program, Option- -drag it to the desktop to create an alias, and so on.

2.13.3. Customizing Spotlight

You've just read about how Spotlight works fresh out of the box. But you can tailor its behavior, both for security reasons and to fit it to the kinds of work you do.

Here are three ways to open the Spotlight preferences center:

  • Choose "Spotlight preferences" at the bottom of the Spotlight menu (that is, just after you've performed a search).

  • Use Spotlight itself. Hit -Space, type spotl , press -Enter.

  • Open System Preferences. Click Spotlight.

    In any case, you wind up face-to-face with the dialog box shown in Figure 2-25.

Figure 2-25. The Spotlight preference pane is your quick and easy switchboard for all of Spotlight's essential settings: the keystrokes that invoke it, the folders it searches, and so on.


You can tweak Spotlight in three ways here, all very useful.

  • Turn off categories . The list of checkboxes before you identifies all the kinds of things that Spotlight tracks. But if you find that Spotlight uses up precious menu space listing stuff you don't need to find very oftensay, Web bookmarks or fontsturn off their checkboxes. Now the Spotlight menu's precious 20 slots will be allotted to icon types you care more about.

  • Prioritize the categories . This dialog box also lets you change the order of the category results: Just drag an individual list item up or down to change where it appears in the Spotlight menu.

  • Change the keystroke . Ordinarily, pressing -Space highlights the Spotlight search box in your menu bar, and Option- -Space opens the Spotlight window described above. If these keystrokes clash with some other key assignment in your software, though, you can reassign them to almost any other keystroke you like.

    Most people notice only the pop-up menu that lets you select one of your F-keys (the function keys at the top of your keyboard). But you can also click inside the white box that lists the keystroke and then press any key combinationControl-S, for exampleto choose something different. Whatever keystroke you choose must include at least one of the modifier keysOption, Ctrl, or or be an F-key.


Note: Don't use a keystroke that messes up some other function on your Mac. -S, for example, would not be a good choice.
2.13.3.1. Privacy settings

Ordinarily, Spotlight doesn't consider any corner of your hard drive off-limits. It looks for matches wherever it can (except in other people's Home folders, that is; you can't search through other people's stuff).

But even within your own Mac world, you can hide certain folders from Spotlight searches. Maybe you have privacy concernsyou don't want your spouse, for example, Spotlighting your stuff while you're away from your desk. Maybe you just want to create more focused Spotlight searches, removing a lot of old, extraneous junk from its database.

Figure 2-26. You can add disks, partitions, or folders to the list of non-searchable items just by dragging them from the desktop into this window. Or, if the private items aren't visible at the moment, you can click the + button, navigate your hard drive, select the item, and click Choose. To remove something from this list, click it and then press the Delete key or click the button.


Either way, the steps are simple. Open the Spotlight panel of System Preferences, as described above. Click the Privacy tab. Figure 2-26 explains the remaining steps.

Once you've built up the list of private disks and folders, close System Preferences. Spotlight will pretend they don't even exist.



Switching to the Mac[c] The Missing Manual
Switching to the Mac[c] The Missing Manual
ISBN: 1449398537
EAN: N/A
Year: 2006
Pages: 371

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net