LUCENE-7067: add missing checkIntegrity calls for Points

This commit is contained in:
Robert Muir 2016-03-04 17:24:17 -05:00
parent 91e29bab67
commit 144273a814
3 changed files with 17 additions and 0 deletions

View File

@ -131,6 +131,13 @@ public abstract class PointWriter implements Closeable {
/** Default merge implementation to merge incoming points readers by visiting all their points and
* adding to this writer */
public void merge(MergeState mergeState) throws IOException {
// check each incoming reader
for (PointReader reader : mergeState.pointReaders) {
if (reader != null) {
reader.checkIntegrity();
}
}
// merge field at a time
for (FieldInfo fieldInfo : mergeState.mergeFieldInfos) {
if (fieldInfo.getPointDimensionCount() != 0) {
mergeOneField(mergeState, fieldInfo);

View File

@ -122,6 +122,11 @@ public class Lucene60PointWriter extends PointWriter implements Closeable {
return;
}
}
for (PointReader reader : mergeState.pointReaders) {
if (reader != null) {
reader.checkIntegrity();
}
}
for (FieldInfo fieldInfo : mergeState.mergeFieldInfos) {
if (fieldInfo.getPointDimensionCount() != 0) {

View File

@ -392,5 +392,10 @@ public abstract class CodecReader extends LeafReader implements Accountable {
if (getTermVectorsReader() != null) {
getTermVectorsReader().checkIntegrity();
}
// points
if (getPointReader() != null) {
getPointReader().checkIntegrity();
}
}
}