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:
Michael McCandless 2015-10-27 14:37:10 +00:00
parent 676a0e4f2f
commit 453dc17567
1 changed files with 4 additions and 0 deletions

View File

@ -51,6 +51,10 @@ public abstract class DimensionalWriter implements Closeable {
}
for (int i=0;i<mergeState.dimensionalReaders.length;i++) {
DimensionalReader dimensionalReader = mergeState.dimensionalReaders[i];
if (dimensionalReader == null) {
// This segment has no dimensional values
continue;
}
MergeState.DocMap docMap = mergeState.docMaps[i];
int docBase = mergeState.docBase[i];
dimensionalReader.intersect(fieldInfo.name,