LUCENE-6183: be prepared for future packedints version changes

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1652342 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2015-01-16 05:31:54 +00:00
parent abaa5f6698
commit 3f0e13d8a4
2 changed files with 5 additions and 0 deletions

View File

@ -648,6 +648,10 @@ public final class CompressingStoredFieldsReader extends StoredFieldsReader {
return numDirtyChunks;
}
int getPackedIntsVersion() {
return packedIntsVersion;
}
@Override
public long ramBytesUsed() {
return indexReader.ramBytesUsed();

View File

@ -534,6 +534,7 @@ public final class CompressingStoredFieldsWriter extends StoredFieldsWriter {
}
} else if (matchingFieldsReader.getCompressionMode() == compressionMode &&
matchingFieldsReader.getChunkSize() == chunkSize &&
matchingFieldsReader.getPackedIntsVersion() == PackedInts.VERSION_CURRENT &&
liveDocs == null &&
!tooDirty(matchingFieldsReader)) {
// optimized merge, raw byte copy