public void addField(FieldDescription fieldDescription, QueryProfileTypeRegistry registry) {
        CompoundName name = fieldDescription.getCompoundName();
        if (name.isCompound()) {
            // Add (/to) a query profile type containing the rest of the name.
            // (we do not need the field description settings for intermediate query profile types
            // as the leaf entry will enforce them)
            QueryProfileType type = extendOrCreateQueryProfileType(name.first(), registry);
            type.addField(fieldDescription.withName(name.rest()), registry);
        }
        else {
            ensureNotFrozen();
            fields.put(fieldDescription.getName(), fieldDescription);
        }

        for (String alias : fieldDescription.getAliases())
            addAlias(alias, fieldDescription.getName());
    }
Adds a field to this

@throws IllegalStateException if this is frozen
container-search/src/main/java/com/yahoo/search/query/profile/types/QueryProfileType.java