private Item instantiateEquivItem(String field, String key, Inspector value) {

        HashMap<Integer, Inspector> children = childMap(value);
        Preconditions.checkArgument(children.size() >= 2,
                                    "Expected 2 or more arguments, got %s.", children.size());

        EquivItem equiv = new EquivItem();
        equiv.setIndexName(field);

        for (Inspector word :  children.values()){
            if (word.type() == STRING || word.type() == LONG || word.type() == DOUBLE){
                equiv.addItem(new WordItem(word.asString(), field));
            }
            if (word.type() == OBJECT){
                word.traverse((ObjectTraverser) (key2, value2) -> {
                    assertHasOperator(key2, PHRASE);
                    equiv.addItem(instantiatePhraseItem(field, key2, value2));
                });
            }
        }

        return leafStyleSettings(getAnnotations(value), equiv);
    }
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