in src/main/java/com/vispana/vespa/state/assemblers/ContentAssembler.java [118:130]
private static List<SchemaDocCount> countDocuments(
String schemaName, Map<GroupKey, List<ContentNode>> contentNodeByGroup) {
return contentNodeByGroup.entrySet().stream()
.map(
keySet -> {
var groupKey = keySet.getKey();
var nodes = keySet.getValue();
var docCount =
nodes.stream().flatMap(node -> count(schemaName, node)).reduce(0L, Long::sum);
return new SchemaDocCount(groupKey, docCount);
})
.toList();
}