private void checkFieldNames(Schema schema, FieldSet fieldSet) {
        var invalidFieldNames = fieldSet.getFieldNames().stream()
                .filter(f -> schema.getField(f) == null)
                .map(f -> "'" + f  + "'")
                .toList();
        if (invalidFieldNames.isEmpty()) return;

        var message = "For " + schema + ": ";
        if (invalidFieldNames.size() == 1)
            message = message +  "Field " + invalidFieldNames.get(0) + " in " + fieldSet + " does not exist.";
        else
            message = message + "Fields " + String.join(",", invalidFieldNames) + " in " + fieldSet + " do not exist.";
        throw new IllegalArgumentException(message);
    }
Computes the right "index commands" for each fieldset in a search definition.

@author vegardh
@author bratseth
config-model/src/main/java/com/yahoo/schema/processing/FieldSetSettings.java