Spotlight (software)

from Wikipedia, the free encyclopedia
Spotlight

Spotlight OS X.svg
Basic data

developer Apple
Publishing year April 2005, as part of OS X 10.4
operating system macOS
category Desktop search
License Proprietary
German speaking Yes
https://support.apple.com/en-us/HT204014

Spotlight is a desktop search for macOS developed by Apple . It is designed to find the user's files as quickly as possible, including documents, pictures, music, programs, contacts, mails, and many other files. Spotlight is based on indices that it creates for all available data carriers and updates transparently. Each file is indexed along with its metadata . As soon as the user starts a search, the indices of the data carriers are searched for suitable results ( suggestion search ).

Spotlight was introduced at WWDC 2004 and shipped with Mac OS X Tiger in April 2005 .

A refreshed version of Spotlight was unveiled at WWDC 2014 as part of OS X Yosemite .

Apple offers two APIs for Spotlight, one for searching files (SearchKit) and one for creating Spotlight import modules (distributed across various Cocoa frameworks).

Look before Tiger in Mac OS X

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

In March 2002, Apple hired developer and file system designer Dominic Giampaolo to develop Spotlight. Spotlight was presented to the public for the first time at the keynote at WWDC 2004. Sherlock was no longer supported; As of the end of 2010, almost all of Sherlock's services were no longer available.

functionality

Spotlight is divided into two components: on the one hand the backend with the metadata server and on the other hand all 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 (is started when logging in; one instance per user). The metadata server becomes active when it is addressed by clients or when files are created or changed. The metadata server receives information about the files on connected hard drives and USB media (CDs / DVDs are not indexed because no index can be created on the data carriers) via the mdimport daemon . This tries to get an importer for the type of file. The importer must then examine the file for its metadata, and then return a collection of metadata for the file to the server, which stores this information in the index

When the operating system is started for the first time, all files are indexed once. This takes some time, after which Spotlight is ready to use, and all changes to the index are made incrementally and in the background from then on. If the system detects that the volume has been modified by a system running Mac OS X 10.4 or a non-Mac system, the index is discarded and rebuilt.

User interfaces

A search in the Finder for "apple tiger" with additional conditions

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+ Leertaste. The user can enter a search query in the Spotlight menu. Spotlight then tries to find files that best match the request. The order of the results can be set in the system settings. Spotlight only returns files that the user has read permission for.

You can also search for files using the Finder . There you can search for file name or content and the user can specify whether the search should only be carried out in the current folder or on the entire hard disk. Furthermore, additional conditions for the search can be defined (e.g. “last opened: yesterday” or “file type: image”). Each Spotlight search can also act as so-called "intelligent search" ( Smart Search are stored); the query is saved with all parameters, but not the results. These saved searches can easily be called up again later; they then deliver the current result at the time of the call.

By default, Spotlight queries with multiple terms are treated as if the Boolean operator AND was placed between each term . When using the API, a request can also be made in text form; comparison operators from C can also be used ( <, >, <=, >=, ==, !=) as well as logical operators ( ||, &&) and wildcards ( *). Only the Boolean operators ORand NOTcan be used for text queries in the user interface (via the Spotlight menu) .

Apple offers developers an API to access the Spotlight Index (SearchKit). In combination with their own importers for certain file types, developers can also enable complex Spotlight searches in their programs. An example of this is the mail program from Apple, which has its own Spotlight importer (for reading out the metadata in e-mails ) and enables the user to search his entire mail archive for this metadata. Another example is the system settings: if the user is e.g. B. searches for "buttons", the results are u. a. the mouse or keyboard settings are offered.

Locally installed programs that Spotlight finds can be started directly from the results list.

Each user can specify in the system settings whether there are folders or data storage media that Spotlight should not search; every user can also determine which categories of files he would like to see in the Spotlight menu and in which order they should appear.

With Mac OS X, Apple provides four command line tools for Spotlight that can also be used with Darwin :

  • mdutil : enables the user to switch the index on and off for individual data carriers or to discard it.
  • mdimport : In addition to the automatic call for each file by the metadata server, users can manually add files to the index with this tool.
  • mdfind : Executing Spotlight requests on the command line.
  • mdls : Lists the metadata attributes for a specified file.

What's new in 10.5 (Leopard)

With Mac OS X Leopard , a few new features were added to Spotlight.

If another Mac is sharing files on the network, they can be searched using Spotlight. Boolean operators are now officially supported, and search queries can be nested with brackets. Web pages visited with Apple Safari are also indexed; the URL, the metadata and the content of the website are also indexed. It is possible to perform calculations in the Spotlight menu or look up words in the built-in Oxford dictionary ; to do this, the calculation term or the word must be entered in the search field.

What's new in 10.7 (Lion)

In Mac OS X Lion , the Spotlight menu has expanded, but not Spotlight itself.

You can start a search query on the Internet or Wikipedia directly from the Spotlight menu, and a preview can be displayed directly for many files (e.g. texts, images, PDFs, but also dictionary results).

What's new in 10.10 (Yosemite)

Spotlight in OS X Yosemite

A refreshed version of Spotlight was unveiled at WWDC 2014 as part of OS X Yosemite . The suggestion search now includes Wikipedia access and map display. However, the feature is not available in many regions outside Western Europe and Anglo-Saxon countries.

New in 10.11 (El Capitan)

A new addition in El Capitan was the ability to formulate search queries to Spotlight in natural language within certain limits. For example, Spotlight can search for “emails from Peter” or “emails yesterday” and filter out the other file types and files that were processed at different times in the search results. The Mac App Store can also be searched. Conversions of currencies or temperature values ​​are also possible in Spotlight.

iOS

Since iOS 3.0 (formerly: iPhone OS), the system also has a search function called Spotlight. Until iOS 6 it was to be found on the left of the first home screen. Since the introduction of the iOS 7 operating system in 2013, the spotlight search can be activated by swiping down from the center of any screen.

The search scope is drastically reduced, basically only the list of installed apps and data from the apps supplied can be searched (apps, contacts, messages, music, etc.), but Internet search queries and Wikipedia can also be made from the Spotlight screen -Search will be started. Search in some built-in apps (e.g. Messages or Mail) is also based on Spotlight.

Individual evidence

  1. Apple - Mac OS X - Spotlight ( Memento from November 9, 2005 in the Internet Archive )
  2. Dominic Giampaolo's Home Page
  3. a b Daring Fireball: Spotlight on Spotlight
  4. Spotlight Overview: How Does Spotlight Work? .
  5. a b Mac OS X 10.4 Tiger
  6. a b Apple - Mac OS X Leopard - Features - 300+ New Features ( Memento from January 7, 2008 in the Internet Archive )
  7. OS X Yosemite: Search with Spotlight , Spotlight Suggestions feature availability
  8. OS X El Capitan: Search with Spotlight. In: support.apple.com. Retrieved June 12, 2016 .
  9. Apple - iPhone 4 - Search for text across every app and the web ( Memento from November 29, 2010 in the Internet Archive )