private static void instantiateFieldDescription(QueryProfilesConfig.Queryprofiletype.Field fieldConfig,
                                                    QueryProfileType type,
                                                    QueryProfileTypeRegistry registry) {
        try {
            FieldType fieldType = FieldType.fromString(fieldConfig.type(), registry);
            FieldDescription field = new FieldDescription(fieldConfig.name(),
                                                          fieldType,
                                                          fieldConfig.alias(),
                                                          fieldConfig.mandatory(),
                                                          fieldConfig.overridable()
            );
            type.addField(field, registry);
        }
        catch (IllegalArgumentException e) {
            throw new IllegalArgumentException("Invalid field '" + fieldConfig.name() + "' in " + type, e);
        }
    }
Fill a given profile by locating its config
container-search/src/main/java/com/yahoo/search/query/profile/config/QueryProfileConfigurer.java