@Override
        boolean serialize(StringBuilder destination, EquivItem item) {
            String annotations = leafAnnotations(item);
            destination.append(getIndexName(item.getItem(0))).append(" contains ");
            if (!annotations.isEmpty()) {
                destination.append("({").append(annotations).append("}");
            }
            destination.append(EQUIV).append('(');
            int initLen = destination.length();
            for (Iterator<Item> i = item.getItemIterator(); i.hasNext();) {
                Item x = i.next();
                if (destination.length() > initLen) {
                    destination.append(", ");
                }
                if (x instanceof PhraseItem) {
                    PhraseSerializer.serialize(destination, (PhraseItem)x, false);
                } else {
                    destination.append('"');
                    escape(((IndexedItem) x).getIndexedString(), destination);
                    destination.append('"');
                }
            }
            if (!annotations.isEmpty()) {
                destination.append(')');
            }
            destination.append(')');
            return false;
        }
Serialize Vespa query trees to YQL+ strings.

@author Steinar Knutsen
container-search/src/main/java/com/yahoo/search/yql/VespaSerializer.java