private void renderHitAttributes(Hit hit, XMLWriter writer) {
        writer.attribute(TYPE, hit.types().stream().collect(Collectors.joining(" ")));
        if (hit.getRelevance() != null)
            writer.attribute(RELEVANCE, hit.getRelevance().toString());
        writer.attribute(SOURCE, hit.getSource());
    }
Writes a hit's default attributes like 'type', 'source', 'relevance'.
container-search/src/main/java/com/yahoo/search/pagetemplates/result/PageTemplatesXmlRenderer.java