LUCENE-8153: Fix usage.

This commit is contained in:
Adrien Grand 2018-02-20 18:59:30 +01:00
parent 317a2e0c3d
commit 4bb705bad8
1 changed files with 4 additions and 3 deletions

View File

@ -2843,6 +2843,7 @@ public final class CheckIndex implements Closeable {
* @return An Options struct * @return An Options struct
* @throws IllegalArgumentException if any of the CLI args are invalid * @throws IllegalArgumentException if any of the CLI args are invalid
*/ */
@SuppressForbidden(reason = "System.err required: command line tool")
public static Options parseOptions(String[] args) { public static Options parseOptions(String[] args) {
Options opts = new Options(); Options opts = new Options();
@ -2853,8 +2854,8 @@ public final class CheckIndex implements Closeable {
opts.doChecksumsOnly = true; opts.doChecksumsOnly = true;
} else if ("-exorcise".equals(arg)) { } else if ("-exorcise".equals(arg)) {
opts.doExorcise = true; opts.doExorcise = true;
} else if ("-doSlowChecks".equals(arg)) { } else if ("-crossCheckTermVectors".equals(arg)) {
System.err.println("-doSlowChecks is deprecated, use -slow instead"); System.err.println("-crossCheckTermVectors is deprecated, use -slow instead");
opts.doSlowChecks = true; opts.doSlowChecks = true;
} else if ("-slow".equals(arg)) { } else if ("-slow".equals(arg)) {
opts.doSlowChecks = true; opts.doSlowChecks = true;
@ -2883,7 +2884,7 @@ public final class CheckIndex implements Closeable {
if (opts.indexPath == null) { if (opts.indexPath == null) {
throw new IllegalArgumentException("\nERROR: index path not specified" + throw new IllegalArgumentException("\nERROR: index path not specified" +
"\nUsage: java org.apache.lucene.index.CheckIndex pathToIndex [-exorcise] [-doSlowChecks] [-segment X] [-segment Y] [-dir-impl X]\n" + "\nUsage: java org.apache.lucene.index.CheckIndex pathToIndex [-exorcise] [-slow] [-segment X] [-segment Y] [-dir-impl X]\n" +
"\n" + "\n" +
" -exorcise: actually write a new segments_N file, removing any problematic segments\n" + " -exorcise: actually write a new segments_N file, removing any problematic segments\n" +
" -fast: just verify file checksums, omitting logical integrity checks\n" + " -fast: just verify file checksums, omitting logical integrity checks\n" +