Spotlight (Software)

Spotlight is an original Apple Desktop Search for Mac OS X. It is designed to quickly find the user's files, including documents, pictures, music, programs, contacts, emails, and many more files. Spotlight based on indices which applies it to all available disks and transparently updated. Each file is indexed along with their metadata. Once the user starts a search, the indices of the media are on matching results back to search ( search suggestion ).

Spotlight was introduced at the WWDC 2004 and delivered in April 2005 along with Mac OS X 10.4.

Apple provides two APIs for Spotlight, a file-browsing ( SearchKit ) and one for creating Spotlight importer modules ( distributed to various Cocoa frameworks ).

Search in Mac OS X before Tiger

From Mac OS 8.5 to Mac OS X 10.3, a program was called Sherlock to find files. The search code was taken from the Apple Search program that Apple had developed in the early 1990s.

In March 2002, Apple introduced a developer and the file system designer Dominic Giampaolo to develop Spotlight. On the Keynote WWDC 2004 Spotlight was presented to the public for the first time. Sherlock was not supported; As of end of 2010, almost all of the services of Sherlock were no longer available.

Operation

Spotlight is divided into two components: one is the backend with the metadata server and on the other all the clients (programs that access the index).

The backend

The Spotlight backend consists of the daemon mds ( metadata server is started with the system) and mdworker (will start at login, one instance per user ). The metadata server becomes active when he is approached by clients, or when files are created or changed. Information about the files on connected hard drives and USB media (CDs / DVDs will not be indexed because it can be applied to the disks no Index ) gets the metadata server via the daemon mdimport. This is trying to get an importer for the type of file. The importer must then examine the file on their metadata out, and then returns a collection of metadata for the file back to the server which stores this information in the index.

When you first start the operating system, all files are indexed once. This takes a while, then Spotlight is ready for use, and all changes to the index happen from then on and incrementally in the background. If the system detects that the disk was changed from a system running Mac OS X 10.4 or a non-Mac system, the index is dropped and rebuilt.

User interface

In the upper right corner there is an icon with a magnifying glass. Clicking on it opens the Spotlight menu. It can also be opened by a keyboard shortcut, the default is cmd spacebar. In the Spotlight menu, the user can enter a search query, and Spotlight will then try to find files that match best to the inquiry. The order of the results can be set in the system settings. Here are Spotlight returns only files for which the user has Read permission.

Finding files can also be reached via the Finder. There can be searched by filename or content and the user can specify whether to search only in the current folder or the whole hard disk. Furthermore, additional conditions for the search can be specified ( eg " opened recently: yesterday " or " file type: image "). Each Spotlight search can be saved as a "smart search " ( Smart Search ); while the query is saved with all the parameters, not the results. These saved searches can be easily accessed later again.

By default, Spotlight inquiries are treated with multiple terms as if placed between each term of the Boolean operator AND. When using the API, a request may be submitted in written form, thereby also comparison operators can be used from C (< ,>, < = ,> =, ==, =! ) And logical operators ( | |, && ) and wildcards ( *). For text requests in the user interface ( via Spotlight menu ), only the Boolean operators OR and NOT can be used.

Apple gives developers an API for accessing the Spotlight index ( SearchKit ). In combination with its own importers are needed for certain file types can thus enabling even complex Spotlight searches in its program a developer. An example of this is the mail program from Apple that has its own Spotlight Importer ( for reading the metadata in e-mails) and allows the user to browse its entire mail archive for those same metadata. Another example is the system settings: when the user eg according to " key " searches, as results are, inter alia, the mouse or keyboard settings offered.

Each user can set in the system settings, if there are folders or volumes, the spotlight is not to search, as can define each user, which categories of files he wants to see in the Spotlight menu, and in what order they should appear.

Apple ships with Mac OS X with four command line tools for Spotlight, which can also be used on Darwin:

  • Mdutil: it allows the user to the index for individual volumes on and off or to reject him.
  • Mdimport: In addition to the automatic call for each file with the metadata server users can add files with this tool manually to the index.
  • Mdfind: Execute Spotlight queries from the command line.
  • Mdls: Lists the metadata attributes for a specified file.

What's new in 10.5 ( Leopard)

With Mac OS X 10.5 some new features were added in Spotlight.

If another Mac files frees the network, they can be searched by Spotlight. Boolean operators are now officially supported, also can use parentheses nested queries are created. With Safari visited websites are also indicated; the URL, the metadata and the content of the website will be paid to indexed. It is possible to perform calculations in the Spotlight menu or look up words in the built-in Oxford dictionary; to the arithmetic expression or the word must be entered in the search box.

What's new in 10.7 (Lion )

In Mac OS X 10.7, the Spotlight menu has been expanded, but not spotlight itself.

IOS

Since iOS 3.0 (formerly iPhone OS), the system has also a search that Spotlight is called. It is left to find the first home screen.

73227
de