mirror of https://github.com/apache/lucene.git
LUCENE-6825: don't NPE when trying to merge a segment that has no documents that indexed dimensional values
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1710830 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
676a0e4f2f
commit
453dc17567
|
@ -51,6 +51,10 @@ public abstract class DimensionalWriter implements Closeable {
|
||||||
}
|
}
|
||||||
for (int i=0;i<mergeState.dimensionalReaders.length;i++) {
|
for (int i=0;i<mergeState.dimensionalReaders.length;i++) {
|
||||||
DimensionalReader dimensionalReader = mergeState.dimensionalReaders[i];
|
DimensionalReader dimensionalReader = mergeState.dimensionalReaders[i];
|
||||||
|
if (dimensionalReader == null) {
|
||||||
|
// This segment has no dimensional values
|
||||||
|
continue;
|
||||||
|
}
|
||||||
MergeState.DocMap docMap = mergeState.docMaps[i];
|
MergeState.DocMap docMap = mergeState.docMaps[i];
|
||||||
int docBase = mergeState.docBase[i];
|
int docBase = mergeState.docBase[i];
|
||||||
dimensionalReader.intersect(fieldInfo.name,
|
dimensionalReader.intersect(fieldInfo.name,
|
||||||
|
|
Loading…
Reference in New Issue