private Object toSpecifiedType(String key, Object value, QueryProfileType type, Map<String,String> context) {
        if ( ! ( value instanceof String)) return value; // already typed
        if (type == null) return value; // no type info -> keep as string
        FieldDescription field = type.getField(key);
        if (field == null) return value; // ditto
        return field.getType().convertFrom(value, new ConversionContext(key, profileRegistry, embedders, context, this));
    }
Maps between the query model and text properties.
This can be done simpler by using reflection but the performance penalty was not worth it,
especially since we should be conservative in adding things to the query model.

@author bratseth
container-search/src/main/java/com/yahoo/search/query/properties/QueryProperties.java