private void addLabels(List<Item> candidates, Ranking ranking) {
        for (Item candidate : candidates) {
            String label = candidate.getLabel();
            if (label != null) {
                String name = "vespa.label." + label + ".id";
                TaggableItem t = (TaggableItem) candidate;
                ranking.getProperties().put(name, String.valueOf(t.getUniqueID()));
            }
        }
    }
Prepares this for binary serialization. For internal use.
container-search/src/main/java/com/yahoo/search/query/Model.java