Instance Method


Removes from the index all searchable items associated with the specified domain.


- (void)deleteSearchableItemsWithDomainIdentifiers:(NSArray<NSString *> *)domainIdentifiers completionHandler:(void (^)(NSError *error))completionHandler;



The domain identifier that describes the group of items to delete. To learn more about domain identifiers, see domainIdentifier.


The block that’s called when the request has been journaled by the index (“journaled” means that the index makes a note that it has to perform this operation). Note that the request may not have completed.

The block receives the following parameter:


If an error occurred, this parameter holds an error object that explains the error. Otherwise, the value of this parameter is nil.


Use this method to delete groups of items. Note that the delete operation is recursive. For example, if domain identifiers are of the form <account-id>.<mailbox-id>, calling this method and specifying <account-id> deletes items with the specified account and any mailbox.

See Also

Managing Items in an Index

- deleteAllSearchableItemsWithCompletionHandler:

Deletes all searchable items from the index.

- deleteSearchableItemsWithIdentifiers:completionHandler:

Removes from the index all items with the specified identifiers.

- indexSearchableItems:completionHandler:

Adds or updates items in the index.