1
0
Эх сурвалжийг харах

proper creation of values for unmapped field on score function

André Carvalho 10 жил өмнө
parent
commit
c2c4742f65

+ 1 - 1
core/src/main/java/org/elasticsearch/common/lucene/search/function/FieldValueFactorFunction.java

@@ -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();
         }