@Override
    public List<SummaryField> getSummaryFields(ImmutableSDField field) {
        List<SummaryField> summaryFields = inherited.isPresent()
            ? requireInherited().getSummaryFields(field)
            : new java.util.ArrayList<>();
        for (DocumentSummary documentSummary : summaries.values()) {
            for (SummaryField summaryField : documentSummary.getSummaryFields().values()) {
                if (summaryField.hasSource(field.getName())) {
                    boolean wanted = true;
                    for (var already : summaryFields) {
                        if (summaryField == already) wanted = false;
                    }
                    if (wanted) {
                        summaryFields.add(summaryField);
                    }
                }
            }
        }
        return summaryFields;
    }
Returns all summary fields, of all document summaries, which has the given field as source.
The list becomes owned by the receiver.

@param field the source field
@return the list of summary fields found
config-model/src/main/java/com/yahoo/schema/Schema.java