Class ConsistencyCheck


  • public class ConsistencyCheck
    extends Object
    Implements a consistency check on the search index. Currently the following checks are implemented:
    • Does the node exist in the ItemStateManager? If it does not exist anymore the node is deleted from the index.
    • Is the parent of a node also present in the index? If it is not present it will be indexed.
    • Is a node indexed multiple times? If that is the case, all occurrences in the index for such a node are removed, and the node is re-indexed.
    • Is a node missing from the index? If so, it is added.
    • Method Detail

      • repair

        public void repair​(boolean ignoreFailure)
                    throws IOException
        Repairs detected errors during the consistency check.
        Parameters:
        ignoreFailure - if true repair failures are ignored, the repair continues without throwing an exception. If false the repair procedure is aborted on the first repair failure.
        Throws:
        IOException - if a repair failure occurs.
      • getErrors

        public List<ConsistencyCheckError> getErrors()
        Returns the errors detected by the consistency check.
        Returns:
        the errors detected by the consistency check.
      • doubleCheckErrors

        public void doubleCheckErrors()