init(queryString:queryContext:)
Initializes and returns a query object with the specified query string and query context.
Declaration
init(queryString: String, queryContext: CSSearchQueryContext?)Return Value
An initialized query object.
Discussion
queryString: A formatted string that defines the matching criteria to apply to indexed items. To learn how to construct a query string, see Create a query string for your search.
This parameter must not be
nil.queryContext: A CSSearchQueryContext object that focuses the query results.
Discussion
After you create and initialize a query object, and call start() to begin the query, you can’t update or reuse the query object for a new query.