@Override
        boolean serialize(StringBuilder destination, ONearItem item) {
            String annotations = NearSerializer.nearAnnotations(item);

            destination.append(getIndexName(item.getItem(0))).append(" contains ");
            if (!annotations.isEmpty()) {
                destination.append('(').append(annotations);
            }
            destination.append(ONEAR).append('(');
            int initLen = destination.length();
            for (ListIterator<Item> i = item.getItemIterator(); i.hasNext();) {
                WordItem close = (WordItem) i.next();
                if (destination.length() > initLen) {
                    destination.append(", ");
                }
                destination.append('"');
                escape(close.getIndexedString(), destination).append('"');
            }
            destination.append(')');
            if (!annotations.isEmpty()) {
                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