private static Item collapsePhrase(PhraseItem phrase) {
        if (phrase.getItemCount() == 1 && phrase.getItem(0) instanceof WordItem word) {
            // TODO: Other stuff which needs propagation?
            word.setWeight(phrase.getWeight());
            return word;
        } else {
            return phrase;
        }
    }
Collapses single item phrases in the tree to the contained item.

@param unwashed The item whose phrases to simplify.
@return The simplified item.
container-search/src/main/java/com/yahoo/prelude/query/parser/AbstractParser.java