mirror of https://github.com/apache/lucene.git
LUCENE-7067: add missing checkIntegrity calls for Points
This commit is contained in:
parent
91e29bab67
commit
144273a814
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -392,5 +392,10 @@ public abstract class CodecReader extends LeafReader implements Accountable {
|
|||
if (getTermVectorsReader() != null) {
|
||||
getTermVectorsReader().checkIntegrity();
|
||||
}
|
||||
|
||||
// points
|
||||
if (getPointReader() != null) {
|
||||
getPointReader().checkIntegrity();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue