Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

LUCENE-1044: fix CheckIndex tool to properly identify 2.4 index format

Michael McCandless8c9f2ce2274f
diff --git a/src/java/org/apache/lucene/index/CheckIndex.java b/src/java/org/apache/lucene/index/CheckIndex.java
index b11f799accb..0db92dfdc10 100644
--- a/src/java/org/apache/lucene/index/CheckIndex.java
+++ b/src/java/org/apache/lucene/index/CheckIndex.java
@@ -113,9 +113,8 @@ public class CheckIndex {
sFormat = "FORMAT_SINGLE_NORM_FILE [Lucene 2.2]";
else if (format == SegmentInfos.FORMAT_SHARED_DOC_STORE)
sFormat = "FORMAT_SHARED_DOC_STORE [Lucene 2.3]";
- else if (format < SegmentInfos.FORMAT_CHECKSUM) {
+ else if (format == SegmentInfos.FORMAT_CHECKSUM) {
sFormat = "FORMAT_CHECKSUM [Lucene 2.4]";
- skip = true;
} else if (format < SegmentInfos.FORMAT_CHECKSUM) {
sFormat = "int=" + format + " [newer version of Lucene than this tool]";
skip = true;