Every damage found and every repair made is reported through the ErrorOccurred event. The repair keeps documents whenever possible: the documents of a segment or a text that cannot be restored are deleted from the index, so that the next update indexes their files again. The event names every deleted document by its key: a document added from a stream or a structure is not indexed again by an update, so it has to be added again. A file that cannot be read for a reason other than damage, for example because another process has locked it, is not taken for a damaged file: the check stops, the reason is reported, and nothing is repaired. So is a file that a newer version of the library has written.