private void addSdField(Schema schema, SDDocumentType document, SDField field, boolean validate) {
        if (! field.hasIndex() && field.getAttributes().isEmpty() && !field.doesSummarying()) {
            return;
        }
        for (Attribute atr : field.getAttributes().values()) {
            if (!atr.getName().equals(field.getName())) {
                addField(schema, document, new SDField(document, atr.getName(), atr.getDataType()), validate);
            }
        }
        addField(schema, document, field, validate);
    }
This processor creates a {@link com.yahoo.schema.document.SDDocumentType} for each {@link Schema}
object which holds all the data that search
associates with a document described in a search definition file. This includes all extra fields, summary fields and
implicit fields. All non-indexed and non-summary fields are discarded.
config-model/src/main/java/com/yahoo/schema/processing/AddExtraFieldsToDocument.java