private void checkTypes(Schema schema, FieldSet fieldSet) {
        var tensorFields = new LinkedList<String>();
        var nonTensorFields = new LinkedList<String>();
        for (String fieldName : fieldSet.getFieldNames()) {
            ImmutableSDField field = schema.getField(fieldName);
            if (field.getDataType() instanceof TensorDataType) {
                tensorFields.add(field.getName());
            } else {
                nonTensorFields.add(field.getName());
            }
        }
        if (!tensorFields.isEmpty() && !nonTensorFields.isEmpty()) {
            throw new IllegalArgumentException("For schema '" + schema.getName() + "', fieldset '" + fieldSet.getName() + "': " +
                    "Illegal mixing of tensor fields ['" + String.join("','", tensorFields) + "'] " +
                    "and non-tensor fields ['" + String.join("','", nonTensorFields) + "']");
        }
    }
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