private static boolean isRebuildRequired(@NotNull IndexVersion.IndexVersionDiff diff) {
    return diff instanceof IndexVersion.IndexVersionDiff.CorruptedRebuild ||
           diff instanceof IndexVersion.IndexVersionDiff.VersionChanged;
  }
private static boolean isRebuildRequired(@NotNull IndexVersion.IndexVersionDiff diff)