As this method checks every byte in the index, on a large index it can take quite a long time to run.
WARNING: make sure you only call this when the index is not opened by any writer.
public virtual Status CheckIndex_Renamed_Method() { return CheckIndex_Renamed_Method(null); }
public static bool Check(Directory dir, bool doFix, System.Collections.IList onlySegments) { CheckIndex checker = new CheckIndex(dir); Status status = checker.CheckIndex_Renamed_Method(onlySegments); if (doFix && !status.clean) { checker.FixIndex(status); } return(status.clean); }