Class

NSCoreDataCoreSpotlightDelegate

A delegate that supports Core Spotlight integration.

Declaration

class NSCoreDataCoreSpotlightDelegate : NSObject

Topics

Creating a Delegate

init(forStoreWith: NSPersistentStoreDescription, model: NSManagedObjectModel)

Initializes a spotlight delegate with the specified description and managed object model.

Searching

func domainIdentifier() -> String

Identifies the Core Spotlight domain.

func indexName() -> String?

Provides a name for the Core Spotlight index.

func attributeSet(for: NSManagedObject) -> CSSearchableItemAttributeSet?

Creates and returns the searchable attributes for the referenced managed object.

Reindexing

func searchableIndex(CSSearchableIndex, reindexAllSearchableItemsWithAcknowledgementHandler: () -> Void)

Requests that the delegate reindex all of its searchable data and clear any local state.

func searchableIndex(CSSearchableIndex, reindexSearchableItemsWithIdentifiers: [String], acknowledgementHandler: () -> Void)

Requests that the delegate reindex the searchable data using the provided identifiers.

Relationships

Inherits From

Conforms To

See Also

Working with Spotlight

class func elementsDerived(fromExternalRecordAt: URL) -> [AnyHashable : Any]

Returns a dictionary containing the parsed elements derived from the Spotlight external record file that is specified by the given URL.

Spotlight External Record Elements

Specify values for the parsed elements derived from the Spotlight external record file.