@Override
    public Object convertFrom(Object o, QueryProfileRegistry registry) {
        if (o instanceof YqlQuery) return o;
        if (o instanceof String) return YqlQuery.from((String)o);
        return null;
    }
A YQL query template field type in a query profile

@author bratseth
container-search/src/main/java/com/yahoo/search/query/profile/types/QueryFieldType.java