Contents

About File Metadata Queries

Describes how to add Spotlight searching to your applications.

Who Should Read This Document

Spotlight is a fundamental feature of OS X, and all developers should be familiar with its capabilities. Many applications, at a minimum, should offer users the ability to search for selected text using the Spotlight search window.

Organization of This Document

The following articles cover key concepts in understanding how Spotlight can be used to query metadata:

Searching File Metadata with NSMetadataQuery provides a conceptual overview of searching for files using file metadata.

Displaying the Finder’s Spotlight Search Window describes how to present the standard Spotlight search window.

File Metadata Query Expression Syntax describes the metadata query language.

See Also

There are other technologies, not fully covered in this document, that are fundamental to integrating metadata into your applications. Refer to these documents for more details:

Spotlight Overview covers the conceptual details surrounding Spotlight’s metadata usage.

Spotlight Importer Programming Guide describes the plug-ins that extract metadata from document files.

File Metadata Attributes Reference describe the metadata attributes provided by Apple.

The following sample code is available that shows how to generate Spotlight queries.

Spotlighter examples shows how to use Spotlight searches.

PredicateEditorSample shows how to use the rule editor and Spotlight.

PhotoSearch allows the search of images based on name. It allows multiple searches to run simultaneously.

Next

Copyright © 2011 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2011-09-28