private void verifyHasAttribute(String attributeName, boolean isMapLookup) {
        var attribute = attributes.get(attributeName);
        if (attribute == null) {
            throw new UnavailableAttributeException(clusterName, attributeName);
        }
        if (isPrimitiveAttribute(attribute) || (!isMapLookup && isSingleRawBoolOrReferenceAttribute(attribute))) {
            return;
        }
        throw new IllegalInputException("Grouping request references attribute '" +
                attributeName + "' with unsupported type '" + typeAsString(attribute) + "'" +
                (isMapLookup ? " for map lookup" : ""));
    }
Constructs a new instance of this searcher with the given component id and config.

@param clusterConfig The config for the cluster that this searcher is deployed for.
container-search/src/main/java/com/yahoo/search/grouping/GroupingValidator.java