@Override
public FunctionValues getValues(Map context, AtomicReaderContext readerContext) throws IOException {
final FunctionValues vals = source.getValues(context, readerContext);
final FunctionValues targets = target.getValues(context, readerContext);
final FunctionValues defaults = (this.defaultVal == null) ? null : defaultVal.getValues(context, readerContext);
return new FloatDocValues(this) {
@Override
public float floatVal(int doc) {
float val = vals.floatVal(doc);
return (val>=min && val<=max) ? targets.floatVal(doc) : (defaultVal == null ? val : defaults.floatVal(doc));
}