I wonder how to integrate spotlight and coredata using corestore.
I did not find any api exposed by corestore to allow me to do that, the closet thing I can find is storageOption in StorageInterface. However I set it , I will need to have both NSPersistentStoreDescription and NSManagedObjectModel
Originally created by @seanliu1 on GitHub (Mar 5, 2020).
I recently work on coredata and spotlight integration https://developer.apple.com/videos/play/wwdc2017/210/
Apple introduces a few things NSCoreDataCoreSpotlightDelegate
```
container.persistentStoreDescriptions.forEach {
$0.setOption(MyCoreDataCoreSpotlightDelegate(forStoreWith:$0,
model: container.managedObjectModel),
forKey:NSCoreDataCoreSpotlightExporter)
}
```
I wonder how to integrate spotlight and coredata using corestore.
I did not find any api exposed by corestore to allow me to do that, the closet thing I can find is storageOption in StorageInterface. However I set it , I will need to have both NSPersistentStoreDescription and NSManagedObjectModel
```
var storage = SQLiteStore(fileName: "contents.sqlite",
localStorageOptions: .allowSynchronousLightweightMigration
)
storage.storeOptions = [NSCoreDataCoreSpotlightExporter:MySpotLightDelegate(forStoreWith: <#T##NSPersistentStoreDescription#>, model: <#T##NSManagedObjectModel#>)]
dataStack.addStorage(
SQLiteStore(fileName: "contents.sqlite",
localStorageOptions: .allowSynchronousLightweightMigration)
```
not sure what should I put into storeOptions
@spacedema commented on GitHub (Sep 29, 2021):
The store must have persistent history tracking enabled to use NSCoreDataCoreSpotlightDelegate, but CoreStore have not.
https://github.com/JohnEstropia/CoreStore/issues/295
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @seanliu1 on GitHub (Mar 5, 2020).
I recently work on coredata and spotlight integration https://developer.apple.com/videos/play/wwdc2017/210/
Apple introduces a few things NSCoreDataCoreSpotlightDelegate
I wonder how to integrate spotlight and coredata using corestore.
I did not find any api exposed by corestore to allow me to do that, the closet thing I can find is storageOption in StorageInterface. However I set it , I will need to have both NSPersistentStoreDescription and NSManagedObjectModel
not sure what should I put into storeOptions
@spacedema commented on GitHub (Sep 29, 2021):
The store must have persistent history tracking enabled to use NSCoreDataCoreSpotlightDelegate, but CoreStore have not.
https://github.com/JohnEstropia/CoreStore/issues/295