|
This article is part 13 of an ongoing series of articles on this site comparing Apple Mac OS X 10.4 "Tiger" to Red Hat Linux Fedora Core 4 (FC4). (The previous article is here.) The point of this comparison is not to say that one OS or the other is "better" but rather to point out the differences and indicate where an artist who previously used Mac OS X 10.4 would find Linux to be easier, harder, or the same to use as the Mac. See the introduction article for more information and links to the other articles in the series. Although the focus of this series is on the needs of designers, artists, and content creators, the content should be relevant to any number of Mac users or Linux users. Apple's Spotlight is touted (by Apple mostly, and by Mac users) as one of the greatest features in Mac OS X 10.4. It therefore seemed appropriate to devote an installment of the Mac OS X vs. Linux comparison to Spotlight and the equivalent functionality within Red Hat FC4.
What is Spotlight? Spotlight, at its core, is a "search assistant" for Mac OS X 10.4. It's a bit more than searching, however. There are 3 main components to Spotlight. First is the back-end piece which scans the disks attached to the system and builds an index of what it has found on the computer. Second is the search box accessible through the upper-right corner of the Mac desktop (or Finder). As a user begins typing words or phrases into this box, Spotlight begins combing its index for entries that match what is being typed. For example, if a user was looking for every file that mentions "elephant" it is likely that by the time they've typed the "p" in "elephant" that Spotlight has located all its "elephant" files from its index. The last part of Spotlight is the ability to create "smart folders" which, for all intents and purposes, act just like real folders but contain the files found for a specific search. For example, imagine that you're an artist who has created the company's logos for its 10-20 products. You probably keep the "source" artwork in a folder for that product. But there are times (such as when you're laying out a newsletter or creating a company-wide brochure or catalog) that you need to access all the products' logos at once. By doing a search on "logo" for example, you can turn that search into a "smart folder" containing every file related to the term "logo". When you need a logo, you'll look in this smart folder and find it there without having to search for it or remember where you saved it. Similarly, as new logos are added to your system, the underlying search done by this smart folder will pick it up and add it to the contents. To reduce disk space requirements, smart folders don't actually duplicate the files and folders they contain. Instead, they contain links back to the original file. How Does SpotLight Work? The precise details of Spotlight's inner workings are an Apple trade secret and are therefore unavailable, but Apple's developer web site provides sufficient information about the feature to understand how it functions. According to Apple's web site "When you search via Spotlight, you're actually accessing a comprehensive, constantly updated index that sees all the metadata inside supported files - the 'what, when, and who' of every piece of information saved on your Mac - including the kind of content, the author, edit history, format, size, and many more details...And because Spotlight indexes content as well, your search results include what appears inside a file or document, not just its title." How is this index built? When a file is added, updated, or deleted from the system, the OS X kernel notifies Spotlight's engine that the file's information has changed. If Spotlight has a plug-in for that file type, it will import the metadata from the file and add it to its index. When a user attempts a Spotlight search, the Spotlight engine compares what the user is typing in against the contents of its index, obtaining and refining the results as it goes. From its System Preferences pane, it can be determined that Spotlight attempts to search at least the following information on the computer: - Applications
- System Preferences
- Documents on the system
- Mail messages
- Contacts
- Events and To-Do Items
- Images
- PDF Documents
- Bookmarks
- Music files
- Movie files
- Fonts
- Presentations
It's possible for a user to tell Spotlight NOT to search a given category of information for privacy purposes (e.g., don't search the administrator's email messages since there could be confidential information in there). Apple's web site indicates that Spotlight supports a specific list of file formats by default, including (but not limited to): - JPEG, PNG, TIFF, and GIF images
- MP3 and AAC audio files
- QuickTime movies
- PDF files
- Microsoft Word and Excel documents
- Text files
- iChat transcripts
- Email messages
- Address Book contacts
- iCal calendar files
The Apple developer site indicates that application developers can include Spotlight support for their application's documents by providing a "meta-data importer plug-in" for Spotlight to help it understand the document's format. What Does Spotlight Look Like in Action? In reality, there isn't much to see in Spotlight. From the user's perspective, Spotlight consists of two main components, the search box which appears in the upper right corner of the screen and the System Preferences pane for Spotlight. The Spotlight System Preferences Pane appears below:  Spotlight's System Preferences for Search Results
From here, it is possible for the user to exclude certain kinds of content from a Spotlight Search, change the keystrokes which activate Spotlight, or (on the tab below) request that certain data be exluded from the search: Spotlight System Preferences Privacy Tab
Performing a Spotlight search is relatively simple. The user clicks the Spotlight icon in the upper right hand corner of the screen. That icon resembles the following:  Spotlight Menu Bar Icon Once the icon is clicked, a search box appears:
 Spotlight Search Box Alternatively, the user may go to the "File" menu in the Finder and choose "Find". This results in a slightly different presentation of the Spotlight feature: 
As the user enters search terms into this box, Spotlight begins returning results from its index which match the entered text: Spotlight Search Results
When the entry of the search term is completed (usually, but it depends on the amount of data on the system and in the index), a list of results is available: Linux Search Window
By clicking on an item in the results, the user can open that item in its associated application.Linux Searching
In comparison with Apple's Spotlight, the search features in Linux are relatively crude. It isn't possible to create "smart folders", search emails (unless they're in a text file), or search inside of binary file formats. On the other hand, it is just as easy to locate a given file (if you know its file name or a snippet of the text inside the file) with Linux as it is with Spotlight. The Linux search function in Red Hat FC4 takes place through the following window:
(If you noticed that the above window looks a bit like Mac OS X, that's because I was using a Mac-inspired theme in Gnome, something that can greatly minimize the learning curve in picking up the Linux interface and is an act of customization not possible in OS X.) To use this window, the user enters.part of the file name (if known) into the "Name contains" box. To further limit the results, the user may specify certain text to be found inside the file, a particular modification date or date range, etc. Once the criteria are specified, the user clicks "Find" to locate matching files, which are displayed in the "search results" section at the bottom of the window. Conclusion
Clearly, Apple's Spotlight feature provides a much wider search scope than the Linux search functionality. Spotlight is capable of potentially searching the contents of any file on the system (not just text files), locating system preferences, email messages, and other data that meets the user's criteria. Search results can be saved as "smart folders" and used as an alternative to keeping multiple copies of files on a system or relying on symbolic links between files and folders. It should be noted that there are similar types of search tools available for Linux, such as "Beagle". A Linux user running Beagle could locate not just files by filename, plain text contents, and date/time, but also documents in a variety of formats (e.g., MS Office), emails, web history, IM/IRC conversations, source code, images, music files, applications, and more. This comes extremely close to Apple's Spotlight functionality, again proving that there really is little in OS X that Linux can't fairly quickly duplicate. Stay tuned for the final installment, the conclusion...
Related Blogs:
Related Links:
|