@Override
    public void process(boolean validate, boolean documentsOnly) {
        for (ImmutableSDField field : schema.allConcreteFields()) {
            String fieldName = field.getName();

            // For each attribute, check if the attribute has been created
            // by an indexing statement.
            for (Attribute attribute : field.getAttributes().values()) {
                if (attributeCreated(field, attribute.getName())) {
                    continue;
                }
                // Check other fields or statements that may have created this attribute.
                boolean created = false;
                for (SDField f : schema.allConcreteFields()) {
                    // Checking against the field we are looking at
                    if (!f.getName().equals(fieldName)) {
                        if (attributeCreated(f, attribute.getName())) {
                            created = true;
                            break;
                        }
                    }
                }
                if (validate && !created) {
                    throw new IllegalArgumentException("Attribute '" + attribute.getName() + "' in field '" +
                                                       field.getName() + "' is not created by the indexing statement");
                }
            }
        }
    }
Checks that attribute properties only are set for attributes that have data (are created by an indexing statement).

@author hmusum
config-model/src/main/java/com/yahoo/schema/processing/AttributeProperties.java