private Item instantiateCompositeLeaf(String field, String key, Inspector value) {
        return switch (key) {
            case SAME_ELEMENT -> instantiateSameElementItem(field, key, value);
            case PHRASE -> instantiatePhraseItem(field, key, value);
            case NEAR -> instantiateNearItem(field, key, value);
            case ONEAR -> instantiateONearItem(field, key, value);
            case EQUIV -> instantiateEquivItem(field, key, value);
            case FUZZY -> instantiateFuzzyItem(field, key, value);
            case ALTERNATIVES -> instantiateWordAlternativesItem(field, key, value);
            default -> throw newUnexpectedArgumentException(key, EQUIV, NEAR, ONEAR, PHRASE, SAME_ELEMENT);
        };
    }
Translates a list of grouping requests on JSON form to a list in the grouping language form
container-search/src/main/java/com/yahoo/search/query/SelectParser.java