public Item withRank(Item item) {
        var result = new RankItem();
        result.addItem(getRoot());
        result.addItem(item);
        setRoot(result);
        return result;
    }
Modifies this query to become the current query RANK with the given item.

@return the resulting root item in this
container-search/src/main/java/com/yahoo/search/query/QueryTree.java