use of org.elasticsearch.index.fielddata.AtomicNumericFieldData in project elasticsearch by elastic.
the class FieldDataValueSource method getValues.
@Override
// ValueSource uses a rawtype
@SuppressWarnings("rawtypes")
public FunctionValues getValues(Map context, LeafReaderContext leaf) throws IOException {
AtomicNumericFieldData leafData = (AtomicNumericFieldData) fieldData.load(leaf);
NumericDoubleValues docValues = multiValueMode.select(leafData.getDoubleValues(), 0d);
return new DoubleDocValues(this) {
@Override
public double doubleVal(int doc) {
return docValues.get(doc);
}
};
}
Aggregations