public String toRankingExpression() {
        StringBuilder ret = new StringBuilder();
        String next = begin;
        while (next != null) {
            Tree tree = trees.get(next);
            if (tree.getBegin() != null) {
                if (ret.length() > 0) {
                    ret.append(" + \n");
                }
                ret.append(tree.toRankingExpression());
            }
            next = tree.getNext();
        }
        return ret.toString();
    }
Returns a ranking expression equivalent of this net.
searchlib/src/main/java/com/yahoo/searchlib/treenet/rule/TreeNet.java