From 4bb705bad8fb58128a549d60e27e05a7eced17ee Mon Sep 17 00:00:00 2001 From: Adrien Grand Date: Tue, 20 Feb 2018 18:59:30 +0100 Subject: [PATCH] LUCENE-8153: Fix usage. --- .../core/src/java/org/apache/lucene/index/CheckIndex.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java b/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java index 54a227c19b0..9126b1d02f7 100644 --- a/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java +++ b/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java @@ -2843,6 +2843,7 @@ public final class CheckIndex implements Closeable { * @return An Options struct * @throws IllegalArgumentException if any of the CLI args are invalid */ + @SuppressForbidden(reason = "System.err required: command line tool") public static Options parseOptions(String[] args) { Options opts = new Options(); @@ -2853,8 +2854,8 @@ public final class CheckIndex implements Closeable { opts.doChecksumsOnly = true; } else if ("-exorcise".equals(arg)) { opts.doExorcise = true; - } else if ("-doSlowChecks".equals(arg)) { - System.err.println("-doSlowChecks is deprecated, use -slow instead"); + } 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; @@ -2883,7 +2884,7 @@ public final class CheckIndex implements Closeable { if (opts.indexPath == null) { 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" + " -exorcise: actually write a new segments_N file, removing any problematic segments\n" + " -fast: just verify file checksums, omitting logical integrity checks\n" +