slow-J commented on code in PR #12797:
URL: https://github.com/apache/lucene/pull/12797#discussion_r1399736567
##########
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:
Thanks @rmuir, will add an entry to `MIGRATE.md` and will leave the
deprecated params for now, setting for removal in Lucene 11.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]