Class ConsistencyCheck
- java.lang.Object
-
- org.apache.jackrabbit.core.query.lucene.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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoubleCheckErrors()List<ConsistencyCheckError>getErrors()Returns the errors detected by the consistency check.voidrepair(boolean ignoreFailure)Repairs detected errors during the consistency check.
-
-
-
Method Detail
-
repair
public void repair(boolean ignoreFailure) throws IOExceptionRepairs detected errors during the consistency check.- Parameters:
ignoreFailure- iftruerepair failures are ignored, the repair continues without throwing an exception. Iffalsethe 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()
-
-