private void validateDocument(Context context, SearchCluster cluster, Schema schema, SDDocumentType doc) {
        for (SDDocumentType child : doc.getTypes()) {
            validateDocument(context, cluster, schema, child);
        }
        for (Field field : doc.fieldSet()) {
            DataType fieldType = field.getDataType();
            disallowIndexingOfMaps(context, cluster, schema, field);
            disallowIndexingOfUnsupportedDataTypes(context, cluster, schema, field);
            if ( ! isSupportedInSearchClusters(fieldType)) {
                context.illegal("Field type '" + fieldType.getName() + "' is illegal for search " +
                                "clusters (field '" + field.getName() + "' in schema '" +
                                schema.getName() + "' for cluster '" + cluster.getClusterName() + "').");
            }
        }
    }
This Validator iterates through all search cluster in the given VespaModel to make sure that there are no custom
structs defined in any of its search definitions.

@author Simon Thoresen Hult
config-model/src/main/java/com/yahoo/vespa/model/application/validation/SearchDataTypeValidator.java