From the iCloud Design Guide:
In iOS, actively track a document’s location in the file system. Each instance of your iOS app must be prepared for another instance to move, rename, or delete iCloud-based documents. If your app persistently stores a URL or path information to a file or file package, do not assume that the item will still be there the next time you attempt to access it.
In iOS, employ an
NSMetadataQuery
object, along with file coordination, to actively track the locations of your documents. Early in your app’s launch process, instantiate and configure a metadata query object, start it, and register for its
NSMetadataQueryDidUpdateNotification
notification. Implement the
presentedItemDidMoveToURL:
method and the
presentedItemURL
property to allow your app to respond to pushed changes from iCloud. Refresh your app’s model layer and update your app’s user interface elements as needed.
For details on using metadata queries, see
File Metadata Search Programming Guide.
So using these approaches you should be able to detect when a document is removed and then remove any related CSSearchableItem entries from CoreSpotlight.