@Override
        public String toString() {
            return "summary field '" + name + "' " + type;
        }
Use this, not name() to retrieve the string value of this.
container-search/src/main/java/com/yahoo/search/schema/DocumentSummary.java