private Item setIndexedItem(int index, IndexedItem word) {
        word.setIndexName(this.getIndexName());
        if (word instanceof Item item) {
            item.setWeight(this.getWeight());
        }
        return super.setItem(index, (Item) word);
    }
Adds subitem. The word will have its index name set to the index name of
this phrase. If the item is a word, it will simply be added, if the item
is a phrase, each of the words of the phrase will be added.

@throws IllegalArgumentException if the given item is not a WordItem or PhraseItem
container-search/src/main/java/com/yahoo/prelude/query/PhraseItem.java