LUCENE-7591 - approximate to no. of terms when DVs are not available

This commit is contained in:
Tommaso Teofili 2016-12-12 10:00:21 +01:00
parent 25c7855bba
commit 87d8b5450a
1 changed files with 2 additions and 1 deletions

View File

@ -94,7 +94,8 @@ public class DatasetSplitter {
}
}
if (classValues == null) {
throw new IllegalStateException("field \"" + classFieldName + "\" must have sorted (set) doc values");
// approximate with no. of terms
noOfClasses += leave.reader().terms(classFieldName).size();
}
noOfClasses += valueCount;
}