Instance Property

foundItemsHandler

The block to execute when the query finds a new batch of matching items.

Declaration

var foundItemsHandler: (([CSSearchableItem]) -> Void)? { get set }

Discussion

The block returns no value and takes the following parameter:

items

An array of indexed items that match the specified query.

The query object serializes the calls to the handler block as new items are found. Although items contains only the new items that have been found (previously found items are not included in the array), the query updates foundItemCount before each call to this handler block, so that foundItemCount contains the running total of items that have been found. If no items are found, the query completes successfully and foundItemCount is 0.

See Also

Handling Query Results

var completionHandler: ((Error?) -> Void)?

The block to execute when the query completes.

var foundItemCount: Int

The number of items found so far.