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

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1563251 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2014-01-31 20:39:48 +00:00
parent c69ba8ba8f
commit 2b7540c7a9
4 changed files with 3 additions and 3 deletions

View File

@ -104,7 +104,7 @@ public class Lucene45DocValuesProducer extends DocValuesProducer implements Clos
String dataName = IndexFileNames.segmentFileName(state.segmentInfo.name, state.segmentSuffix, dataExtension); String dataName = IndexFileNames.segmentFileName(state.segmentInfo.name, state.segmentSuffix, dataExtension);
data = state.directory.openInput(dataName, state.context); data = state.directory.openInput(dataName, state.context);
final int version2 = CodecUtil.checkHeader(data, dataCodec, final int version2 = CodecUtil.checkHeader(data, dataCodec,
Lucene45DocValuesFormat.VERSION_CURRENT, Lucene45DocValuesFormat.VERSION_START,
Lucene45DocValuesFormat.VERSION_CURRENT); Lucene45DocValuesFormat.VERSION_CURRENT);
if (version != version2) { if (version != version2) {
throw new CorruptIndexException("Format versions mismatch"); throw new CorruptIndexException("Format versions mismatch");

View File

@ -164,8 +164,8 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
"42.cfs", "42.cfs",
"42.nocfs", "42.nocfs",
// TODO: these are on 4x, but something is wrong (they seem to be a too old DV format): // TODO: these are on 4x, but something is wrong (they seem to be a too old DV format):
//"45.cfs", "45.cfs",
//"45.nocfs", "45.nocfs",
"461.cfs", "461.cfs",
"461.nocfs", "461.nocfs",
}; };