private static void serializeWords(StringBuilder destination, AndSegmentItem segment) {
            for (int i = 0; i < segment.getItemCount(); ++i) {
                if (i > 0) {
                    destination.append(", ");
                }
                Item current = segment.getItem(i);
                if (current instanceof WordItem) {
                    destination.append('"');
                    escape(((WordItem) current).getIndexedString(), destination).append('"');
                } else {
                    throw new IllegalArgumentException("Serializing of " + current.getClass().getSimpleName()
                                                       + " in segment AND expressions not implemented, please report this as a bug.");
                }
            }
        }
Serialize Vespa query trees to YQL+ strings.

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