Search Kit is Apple’s content indexing and searching solution. It offers a powerful and streamlined procedural C framework that you can use to build information retrieval functionality into your Carbon, Cocoa, or Java application, or even into a command-line tool. In Mac 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 works in Mac OS X starting with version 10.3, Panther. Its features, starting with Mac OS X version 10.4, include:
Fast indexing and asynchronous searching (improved in Mac OS X v10.4)
Search mode determined by a Google-like query syntax, including phrase-based searching (new in Mac OS X v10.4)
Text summarization (new in Mac OS X v10.4)
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. Carbon and Cocoa offer other APIs for these other types of search, as described in “How Search Kit Works With Documents.”
Whether you use Carbon, Cocoa, or a combination of the two, 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.
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.
Last updated: 2005-12-06