private static void validateComplexFields(Context context, String clusterName, Schema schema) {
        String unsupportedFields = schema.allFields()
                .filter(field -> hasStructFieldsWithIndex(field))
                .map(ComplexFieldsWithStructFieldIndexesValidator::toString)
                .collect(Collectors.joining(", "));

        if (!unsupportedFields.isEmpty()) {
            // TODO (Vespa 9 or before): Change back to an exception when no applications are using it wrong.
            context.deployState().getDeployLogger().logApplicationPackage(
                    Level.WARNING,
                    String.format("For cluster '%s', schema '%s': The following complex fields have struct fields with 'indexing: index' which is not supported and has no effect: %s. " +
                                  "Remove setting or change to 'indexing: attribute' if needed for matching.",
                                  clusterName, schema.getName(), unsupportedFields));
        }
    }
Validates that complex fields (of type struct or map) do not have any struct fields with 'indexing: index'.
This is not supported and will confuse the user if not validated.

Only applies for indexed search clusters.

@author geirst
config-model/src/main/java/com/yahoo/vespa/model/application/validation/ComplexFieldsWithStructFieldIndexesValidator.java