private static Map<String, Schema> createDocumentNameToSearchMapping(Collection<Schema> schemaDefintions) {
        return schemaDefintions.stream()
                               .filter(search -> search.getDocument() != null)
                               .collect(toMap(search -> search.getDocument().getName(), identity()));
    }
Resolves all document references in the search definitions

Iterates through all document fields having a {@link NewDocumentReferenceDataType} and uses {@link NewDocumentReferenceDataType#getTargetTypeName()}
to determine the referenced document. This information is aggregated into a {@link DocumentReferences} object.

@author bjorncs
config-model/src/main/java/com/yahoo/schema/DocumentReferenceResolver.java