final protected void verifySearchAndDocFields(String searchName, Map<String, DataType> seenFields) {
        schema.allFields().forEach(field -> {
            checkFieldType(searchName, "index field", field.getName(), field.getDataType(), seenFields);
            if (!field.isImportedField()) {
                for (Map.Entry<String, Attribute> entry : field.getAttributes().entrySet()) {
                    checkFieldType(searchName, "attribute", entry.getKey(), entry.getValue().getDataType(), seenFields);
                }
            }
        });

    }
This Processor makes sure all fields with the same name have the same {@link DataType}. This check
explicitly disregards whether a field is an index field, an attribute or a summary field. This is a requirement if we
hope to move to a model where index fields, attributes and summary fields share a common field class.

@author Simon Thoresen Hult
config-model/src/main/java/com/yahoo/schema/processing/ValidateFieldTypes.java