private static void considerComplexField(List<ImportedField> importedFields, ImportedComplexField field) {
        ImmutableSDField targetField = field.targetField();
        if (GeoPos.isAnyPos(targetField)) {
            // no action needed
        } else if (isArrayOfSimpleStruct(targetField)) {
            considerNestedFields(importedFields, field);
        } else if (isMapOfSimpleStruct(targetField)) {
            considerSimpleField(importedFields, field.getNestedField("key"));
            considerNestedFields(importedFields, field.getNestedField("value"));
        } else if (isMapOfPrimitiveType(targetField)) {
            considerSimpleField(importedFields, field.getNestedField("key"));
            considerSimpleField(importedFields, field.getNestedField("value"));
        }
    }
This class derives imported fields from search definition and produces imported-fields.cfg as needed by the search backend.

@author geirst
config-model/src/main/java/com/yahoo/schema/derived/ImportedFields.java