<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.13.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreData",
  "identifier" : "/documentation/CoreData/NSCoreDataCoreSpotlightDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Core Data"
    ],
    "preciseIdentifier" : "c:objc(cs)NSCoreDataCoreSpotlightDelegate"
  },
  "title" : "NSCoreDataCoreSpotlightDelegate"
}
-->

# NSCoreDataCoreSpotlightDelegate

A set of methods that enable integration with Core Spotlight.

```
class NSCoreDataCoreSpotlightDelegate
```

## Overview> Note:
> Core Spotlight integration is only available for persistent stores that have a store type of ``doc://com.apple.coredata/documentation/CoreData/NSPersistentStore/StoreType/sqlite``, and which use persistent history tracking. For more information, see <doc://com.apple.coredata/documentation/CoreData/consuming-relevant-store-changes>.

## Topics

### Creating a Core Spotlight Delegate

[`-  initForStoreWithDescription:coordinator:`](/documentation/CoreData/NSCoreDataCoreSpotlightDelegate/init(forStoreWith:coordinator:))

Creates a Core Spotlight delegate with the specified store description and coordinator.

[`-  initForStoreWithDescription:model:`](/documentation/CoreData/NSCoreDataCoreSpotlightDelegate/init(forStoreWith:model:))

Creates a Core Spotlight delegate with the specified store description and managed object model.

### Configuring the Index

[`indexingEnabled`](/documentation/CoreData/NSCoreDataCoreSpotlightDelegate/isIndexingEnabled)

A Boolean value that indicates whether Core Data is currently updating the Core Spotlight index with the persistent store’s entities.

[`-  domainIdentifier`](/documentation/CoreData/NSCoreDataCoreSpotlightDelegate/domainIdentifier())

Returns the domain identifier.

[`-  indexName`](/documentation/CoreData/NSCoreDataCoreSpotlightDelegate/indexName())

Returns the index’s name.

### Managing the Index

[`-  attributeSetForObject:`](/documentation/CoreData/NSCoreDataCoreSpotlightDelegate/attributeSet(for:))

Returns the searchable attributes for the specified managed object.

[`-  deleteSpotlightIndexWithCompletionHandler:`](/documentation/CoreData/NSCoreDataCoreSpotlightDelegate/deleteSpotlightIndex(completionHandler:))

Deletes all searchable items from the configured index.

[`-  startSpotlightIndexing`](/documentation/CoreData/NSCoreDataCoreSpotlightDelegate/startSpotlightIndexing())

Starts the indexing of the store’s entities.

[`-  stopSpotlightIndexing`](/documentation/CoreData/NSCoreDataCoreSpotlightDelegate/stopSpotlightIndexing())

Stops the indexing of the store’s entities.

### Updating the Index

[`indexDidUpdateNotification`](/documentation/CoreData/NSCoreDataCoreSpotlightDelegate/indexDidUpdateNotification)

The notification the delegate posts after Spotlight updates the index.

[`-  searchableIndex:reindexAllSearchableItemsWithAcknowledgementHandler:`](/documentation/CoreData/NSCoreDataCoreSpotlightDelegate/searchableIndex(_:reindexAllSearchableItemsWithAcknowledgementHandler:))

Reindexes all searchable items and clears any local state.

[`-  searchableIndex:reindexSearchableItemsWithIdentifiers:acknowledgementHandler:`](/documentation/CoreData/NSCoreDataCoreSpotlightDelegate/searchableIndex(_:reindexSearchableItemsWithIdentifiers:acknowledgementHandler:))

Reindexes the searchable items for the specified identifiers.

### Notifications

[`NSCoreDataCoreSpotlightDelegateIndexDidUpdateNotification`](/documentation/CoreData/NSCoreDataCoreSpotlightDelegateIndexDidUpdateNotification)

## Relationships

### Conforms To

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Equatable`](/documentation/Swift/Equatable)

[`CVarArg`](/documentation/Swift/CVarArg)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)