@Override
    public void process(boolean validate, boolean documentsOnly) {
        if ( ! validate) return;

        for (SDField field : schema.allConcreteFields()) {
            DataType type = field.getDataType();
            if (isNonStringArray(type) || type instanceof WeightedSetDataType || type instanceof StructDataType) {
                for (SummaryField sField : field.getSummaryFields().values()) {
                    if (sField.getTransform().equals(SummaryTransform.DYNAMICTEASER)) {
                        throw new IllegalArgumentException("For field '"+field.getName()+"': dynamic summary is illegal " +
                                                           "for fields of type struct, array or weighted set. Use an " +
                                                           "explicit summary class with explicit summary fields sourcing" +
                                                           " from the array/struct/weighted set.");
                    }
                }
            }
        }
    }
Fail if:
An SD field explicitly says summary:dynamic , but the field is non-string array, wset, or struct.
If there is an explicitly defined summary class, saying dynamic in one of its summary
fields is always legal.

@author Vegard Havdal
config-model/src/main/java/com/yahoo/schema/processing/SummaryDynamicStructsArrays.java