slow-J commented on code in PR #12797:
URL: https://github.com/apache/lucene/pull/12797#discussion_r1393115663


##########
lucene/core/src/java/org/apache/lucene/index/CheckIndex.java:
##########
@@ -4051,15 +4057,30 @@ public static Options parseOptions(String[] args) {
     int i = 0;
     while (i < args.length) {
       String arg = args[i];
-      if ("-fast".equals(arg)) {
-        opts.doChecksumsOnly = true;
+      if ("-detailLevel".equals(arg)) {
+        if (i == args.length - 1) {
+          throw new IllegalArgumentException("ERROR: missing value for 
-detailLevel option");
+        }
+        i++;
+        int detailLevel = Integer.parseInt(args[i]);
+        if (detailLevel < DetailLevel.MIN_VALUE || detailLevel > 
DetailLevel.MAX_VALUE) {
+          throw new IllegalArgumentException(
+              String.format(
+                  "ERROR: value for -detailLevel option is out of bounds. 
Please use a value "
+                      + "from '%d'->'%d'",
+                  DetailLevel.MIN_VALUE, DetailLevel.MAX_VALUE));
+        }
+        opts.detailLevel = detailLevel;
+      } else if ("-fast".equals(arg)) {
+        System.err.println("-fast is deprecated, verifying file checksums only 
is now the default");
+      } else if ("-slow".equals(arg)) {
+        System.err.println("-slow is deprecated, use '-detailLevel 3' instead 
for slow checks");
+        opts.detailLevel = DetailLevel.MIN_LEVEL_FOR_SLOW_CHECKS;
       } else if ("-exorcise".equals(arg)) {
         opts.doExorcise = true;
       } else if ("-crossCheckTermVectors".equals(arg)) {
-        System.err.println("-crossCheckTermVectors is deprecated, use -slow 
instead");
-        opts.doSlowChecks = true;
-      } else if ("-slow".equals(arg)) {
-        opts.doSlowChecks = true;
+        System.err.println("-crossCheckTermVectors is deprecated, use 
'-detailLevel 3' instead");

Review Comment:
   Should we remove the deprecated parameters (crossCheckTermVectors, fast, 
slow)?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to