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


##########
lucene/core/src/java/org/apache/lucene/index/CheckIndex.java:
##########
@@ -4127,15 +4123,33 @@ 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 ("-level".equals(arg)) {
+        if (i == args.length - 1) {
+          throw new IllegalArgumentException("ERROR: missing value for -level 
option");
+        }
+        i++;
+        int level = Integer.parseInt(args[i]);
+        if (level < Level.MIN_VALUE || level > Level.MAX_VALUE) {
+          throw new IllegalArgumentException(
+              String.format(
+                  "ERROR: value for -level option is out of bounds. Please use 
a value "
+                      + "from '%d'->'%d'",
+                  Level.MIN_VALUE, Level.MAX_VALUE));

Review Comment:
   Ah I see what you meant earlier now, will add.



-- 
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