private StringBuilder getStringContents(Item item) {
        if (item instanceof TermItem) {
            return new StringBuilder(((TermItem) item).stringValue());
        } else if (item instanceof SegmentItem) {
            return new StringBuilder(((SegmentItem) item).getRawWord());
        } else {
            throw new RuntimeException("Parser bug. Unexpected item type, send stack trace in a bug ticket to the Vespa team.");
        }
    }
Returns a WordItem if this is a non CJK query,
a WordItem or SegmentItem if this is a CJK query,
null if the current item is not a word

@param quoted whether this token is inside quotes
container-search/src/main/java/com/yahoo/prelude/query/parser/StructuredParser.java