public String asString() {
                return name != null ? name : name();
            }
Use this, not name() to retrieve the string value of this.
container-search/src/main/java/com/yahoo/search/schema/DocumentSummary.java