Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

add 45 indices to TestBackCompat; fix back-compat bug in Lucene45DVProducer

Michael McCandless2b7540c7a9cf
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene45/Lucene45DocValuesProducer.java b/lucene/core/src/java/org/apache/lucene/codecs/lucene45/Lucene45DocValuesProducer.java
index 58f91852769..2316fc5798e 100644
--- a/lucene/core/src/java/org/apache/lucene/codecs/lucene45/Lucene45DocValuesProducer.java
+++ b/lucene/core/src/java/org/apache/lucene/codecs/lucene45/Lucene45DocValuesProducer.java
@@ -104,7 +104,7 @@ public class Lucene45DocValuesProducer extends DocValuesProducer implements Clos
String dataName = IndexFileNames.segmentFileName(state.segmentInfo.name, state.segmentSuffix, dataExtension);
data = state.directory.openInput(dataName, state.context);
final int version2 = CodecUtil.checkHeader(data, dataCodec,
- Lucene45DocValuesFormat.VERSION_CURRENT,
+ Lucene45DocValuesFormat.VERSION_START,
Lucene45DocValuesFormat.VERSION_CURRENT);
if (version != version2) {
throw new CorruptIndexException("Format versions mismatch");
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java b/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
index e9298e277cd..a46ef934654 100644
--- a/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
@@ -164,8 +164,8 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
"42.cfs",
"42.nocfs",
// TODO: these are on 4x, but something is wrong (they seem to be a too old DV format):
- //"45.cfs",
- //"45.nocfs",
+ "45.cfs",
+ "45.nocfs",
"461.cfs",
"461.nocfs",
};
diff --git a/lucene/core/src/test/org/apache/lucene/index/index.45.cfs.zip b/lucene/core/src/test/org/apache/lucene/index/index.45.cfs.zip
new file mode 100644
index 00000000000..10a8a1a74b2
Binary files /dev/null and b/lucene/core/src/test/org/apache/lucene/index/index.45.cfs.zip differ
diff --git a/lucene/core/src/test/org/apache/lucene/index/index.45.nocfs.zip b/lucene/core/src/test/org/apache/lucene/index/index.45.nocfs.zip
new file mode 100644
index 00000000000..7825e2ae393
Binary files /dev/null and b/lucene/core/src/test/org/apache/lucene/index/index.45.nocfs.zip differ