Queries the indexes in a search group.
Deprecated
Use SKSearch
instead.
SDK
- macOS 10.3–10.4Deprecated
Framework
- Core Services
Declaration
SKSearch Results Ref SKSearchResultsCreateWithQuery(SKSearch Group Ref inSearchGroup, CFString Ref inQuery, SKSearch Type inSearchType, CFIndex inMaxFoundDocuments, void *inContext, SKSearch Results Filter Call Back inFilterCallBack);
Parameters
inSearchGroup
The search group to query.
inQuery
The query string to search for.
inSearchType
The category of search to perform. See the
SKSearch
enumeration for options.Type inMaxFoundDocuments
The maximum number of found items to return. Your application must pass in a positive integer value.
inContext
An application-specified context for use by the
SKSearch
. Can beResults Filter Call Back NULL
, but if you want to use the callback you must supply a context.inFilterCallBack
A callback function for hit testing during searching. Can be
NULL
, in which case your application receives the returned results directly and without any custom postprocessing. If non-NULL
, you must supply a context. SeeSKSearch
.Results Filter Call Back
Return Value
A search results object.
Discussion
This function searches the on-disk indexes in a search group. Before invoking a search, call SKIndex
on all indexes in the search group to ensure that changes to the indexes have been flushed to disk.
Once you’ve obtained the results of a search, get the specifics—including which documents match the user’s query, and the ranking scores for each document—by calling SKSearch
. You can extract other information by calling SKSearch
and SKSearch
.
When your application no longer needs the search result, dispose of it by calling CFRelease
.
Special Considerations
This deprecated function performs searches synchronously. Apple recommends using the asynchronous SKSearch
function instead.
In the current implementation of Search Kit, unary Boolean operators are not implemented. A search, for example, for ‘not blue’, returns zero documents no matter what their content.