Search Kit is Apple’s content indexing and searching solution. It offers a powerful and streamlined procedural C framework, based on Core Foundation conventions, that you can use add information retrieval to your app, or command-line tool.
In OS X, Search Kit provides fast information retrieval in System Preferences, Address Book, Help Viewer, and Xcode. Apple’s Spotlight technology is built on top of Search Kit to provide content searching in Finder, Mail, and the Spotlight menu.
Search Kit’s features include:
Fast indexing and asynchronous searching
Search mode determined by a Google-like query syntax, including phrase-based searching
Control over index characteristics including minimum term length, stopwords, and synonyms/substitutions
Flexible management of document hierarchies and indexes
Unicode support for language independence
Relevance ranking and statistical analysis of documents to improve search quality
Search Kit is not for locating the position of search terms within a document or for finding documents based on their file-system attributes. For information on these other types of search, see How Search Kit Works With Documents.
Who Should Read This Document
This guide provides the background you’ll need to use Search Kit to add fast content searching to your application. If your application focuses on metadata rather than document content, you may want to consider using Spotlight instead.
Use the Search Kit API when you want your application to have full control over indexing and searching. Also use Search Kit when your “documents” are not necessarily files on disk but web pages, database records, and so on.
Use the simpler Spotlight API either when your focus is local file metadata or when your application does not need precise control over indexing or of the document hierarchy, or both.
Organization of This Document
Search Kit Programming Guide contains the following chapters:
Search Basics, an optional introductory chapter, gets you up to speed on some of the basics of information retrieval as a foundation for the rest of the book. If you are familiar with terms such as corpus, text extraction, inverted index, query, Boolean search, and relevance ranking, you can skip this chapter.
Search Kit Concepts describes the elements of Search Kit’s approach to searching. Read this chapter to learn about Search Kit’s notion of documents, terms, indexes, queries, searches, and search results. This chapter also provides an overview of the workflow behind a user’s search, from text extraction to display of ranked results.
Search Kit Tasks provides detailed instructions on how to accomplish each of the steps involved in a practical usage scenario with Search Kit. It also provides sample code excerpts illustrating each step.
A glossary at the end lists terms that you need in order to understand information retrieval in general and Search Kit in particular.
You may find this additional information from Apple helpful:
Search Kit Reference describes the entire Search Kit API in detail.
Memory Management Programming Guide for Core Foundation provides an introduction to memory management in Core Foundation. Search Kit uses Apple's Core Foundation style for memory management.
Debugging Programming Topics for Core Foundation provides an introduction to debugging and error handling in Core Foundation. Search Kit uses Apple's Core Foundation style for error handling.
Working With Spotlight provides an introduction to using Apple's Spotlight technology.