Remove Items From the Spotlight Index

I have successfully added entries to the search index. I tried to delete a couple of them like this


[[CSSearchableIndex defaultSearchableIndex]
deleteSearchableItemsWithIdentifiers:deletedIdentifiers completionHandler:^(NSError *deletionError) {
                if (deletionError)
                {
                NSLog(@"Could not delete items from the search index with error %@", deletionError);
                }
                }];

gave me this error

[com.apple.corespotlight.log.index] Hit Error index items:Error Domain=NSCocoaErrorDomain Code=4097 "Couldn’t communicate with a helper application." (connection to service named com.apple.spotlight.IndexAgent) UserInfo=0x7fa071fcb740 {NSDebugDescription=connection to service named com.apple.spotlight.IndexAgent}

Am I doing something wrong or should I open a radar?


Regards

Please open a bug report, and post the number here so I can keep an eye on it. If you have a sample project you can attach, that'd be terrific.

Remove Items From the Spotlight Index
 
 
Q