LUCENE-2954: Fix CheckIndex to print correct version numbers and fail if tool was not updated.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1079386 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2011-03-08 15:10:57 +00:00
parent 4b2364aa5b
commit a4ad5a8d56
1 changed files with 6 additions and 0 deletions

View File

@ -348,8 +348,14 @@ public class CheckIndex {
if (format == DefaultSegmentInfosWriter.FORMAT_DIAGNOSTICS) {
sFormat = "FORMAT_DIAGNOSTICS [Lucene 2.9]";
} else if (format == DefaultSegmentInfosWriter.FORMAT_HAS_VECTORS) {
sFormat = "FORMAT_HAS_VECTORS [Lucene 3.1]";
} else if (format == DefaultSegmentInfosWriter.FORMAT_3_1) {
sFormat = "FORMAT_3_1 [Lucene 3.1]";
} else if (format == DefaultSegmentInfosWriter.FORMAT_4_0) {
sFormat = "FORMAT_4_0 [Lucene 4.0]";
} else if (format == DefaultSegmentInfosWriter.FORMAT_CURRENT) {
throw new RuntimeException("BUG: You should update this tool!");
} else if (format < DefaultSegmentInfosWriter.FORMAT_CURRENT) {
sFormat = "int=" + format + " [newer version of Lucene than this tool supports]";
skip = true;