Leopard turns Spotlight on search


In recent columns, I’ve talked about the new features coming in Mac OS X 10.5 Leopard, including Time Machine and Spaces. Both are major additions that will make computing more reliable and help organize the way you work within Mac OS X.

Now, I want to talk about two less prominent features — one of which isn’t even new. Leopard will include an enhanced version of Mac OS X’s Spotlight search tool as well as Quick Look, a new tool for previewing documents without opening them.

Compared to Time Machine and Spaces, an updated version of Spotlight may not seem particularly exciting — after all, it got the shortest amount of attention at the Worldwide Developers Conference (WWDC) keynote last August and hasn’t really been talked about since. However, changes that Apple is making both refine and expand Spotlight in major ways, particularly in network environments.

Remote Mac and server search support

One of the biggest advances in Spotlight is that it will be able to search remote computers. This is a big deal for home users, who have different files — think digital photos and music — stored on different Macs. You’ll be able to search across all the Macs in your house for that one photo that you know you downloaded from your camera but can’t find or for the particular CD track you ripped but don’t remember on which of three Macs you placed it. The new and improved Spotlight will even offer some unique parental monitoring capabilities because you can remotely search your kids’ computers if you suspect they’re downloading files illegally or saving files that you feel are inappropriate.

However, the power of remote searching at home is nothing compared to its use in the office. Apple is adding a new Spotlight Server feature to Leopard Server that will index all content on Mac servers, allowing you to search all servers in a network — just as you would look for something on your local Mac. This stands to offer incredible value in any network environment, particularly collaborative environments where many people are working together on a single project.

Being able to search based on metadata, file names and file contents across multiple folders, share points and even multiple servers will make locating documents much simpler. Imagine, for example, a situation in which a colleague asks you to update a grant proposal or an InDesign file for XYZ company. You don’t know the file name or whether it is in a group folder, his public folder or in some other location on your department’s share point. Being able to search among all Spotlight’s criteria — or even just the ability to look at file contents for XYZ company — will make locating the file much easier than locating information in any file on a network has ever been.

Spotlight under Leopard Server will also respect file permissions and access control lists (ACL). That’s critical because it means that while Spotlight would theoretically have access to all information stored on a server, users won’t. Making Spotlight fully respect Mac OS X’s permission structure is actually quite a feat for Apple to tackle (though clearly one that it needed to) because of the varying levels of access people might have. That would include access rights assigned explicitly, through group and nested group membership, POSIX permissions and ACLs.

You don’t want a situation where someone is denied access to a file while browsing through the Finder because they lack permission to an enclosing folder, but can access that file through a Spotlight search because of permissions on a subfolder or even on the file itself. Apple’s Leopard Server Sneak Peek page for Spotlight states that Leopard Server will ensure that if you cannot browse to a file, you will not be able to locate it with Spotlight. No doubt, this is a challenge for Apple’s engineers. But for users and systems administrators it will mean fewer security headaches down the road.

Recent items

During the WWDC keynote, Apple also announced that Spotlight in Leopard will include a “recent items” feature. Recent Items is such a pervasive theme in Mac OS X, and in many applications, that it’s a bit surprising Spotlight didn’t already have such a feature. Being able to recall recently found items or items that you were recently working with is a huge advantage. How many times have you been working on a file, saved it and then not realized where it was saved? This is especially true when you open files on a server or a remote Mac, or files that you receive via e-mail or other messaging means. Those are typically stored in a temp directory of some form.

Advanced search functionality

As powerful as Spotlight is, it actually offers a somewhat limited set of search options. True, searching in Mac OS X — be it with Spotlight or its predecessor, Sherlock — has always offered an array of search criteria (text, date, type of file, size). But until now, the ways that you string those criteria together has been limited. Spotlight in Leopard is designed to offer advanced search functionality by allowing you to select a variety of boolean operatives. (Apple has said so far that AND, OR and NOT will be supported.) Being able to string them together yields a more stringent search result.

In Mac OS X 10.4 Tiger, if you wanted to search for a file whose name contained the word “car” — and you knew it was either a text or PDF file but didn’t contain the phrase “hybrid” — you could search for all files with car in the name and scan through the results (many of which might be images or movies or other types of files). Or you could search for text files with car in their names and then search for PDF files if you didn’t find what you were looking for initially. While both methods would work, you’d either have excess files to check or you’d need multiple searches.

In Leopard, you’ll be able to enter a search that specifies car in the file name, text or PDF as the type, and not files containing the word “hybrid.”

Using Spotlight as an application launcher

Apple’s Leopard Spotlight Sneak Peek page touts another feature: using Spotlight as an application launcher. Specifically, it notes that applications with names matching your search will always appear as top hits in the Spotlight menu. At first glance, this doesn’t seem particularly impressive. After all, that’s how Spotlight works now. However, Apple goes on to say that just hitting return will automatically open the application. Right now, while applications are shown as top hits if they match a search, they aren’t automatically selected. What is selected is the Show All option that displays the Spotlight results. You can, of course, use the menu, the arrow keys or the mouse to navigate to an application and launch it.

Having the top hit be an application that’s automatically selected allows you to enter the first few letters of the application’s name, hit return and open it. This could be a great timesaver for launching apps you don’t keep in the Dock, particularly those not at the root level of the Applications folder.

Note: As useful as this feature will be in Leopard, I’ve been using Spotlight as an application launcher already, albeit with one or two extra keystrokes to select the right application).

Quick Look