proper creation of values for unmapped field on score function

This commit is contained in:
André Carvalho 2015-08-24 10:02:18 -03:00
parent 60ab72e322
commit c2c4742f65
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ public class FieldValueFactorFunction extends ScoreFunction {
public LeafScoreFunction getLeafScoreFunction(LeafReaderContext ctx) {
final SortedNumericDoubleValues values;
if(indexFieldData == null) {
values = FieldData.emptySortedNumericDoubles(0);
values = FieldData.emptySortedNumericDoubles(ctx.reader().maxDoc());
} else {
values = this.indexFieldData.load(ctx).getDoubleValues();
}