private boolean hasAll(Set<String> requested, String summaryName, Set<String> restrict) {
        Set<String> intersection = null;
        for (String schemaName : restrict.isEmpty() ? schemaInfo.schemas().keySet() : restrict) {
            Schema schema = schemaInfo.schemas().get(schemaName);
            if (schema == null) continue;

            DocumentSummary summary = schema.documentSummaries().get(summaryName);
            if (summary == null) {
                intersection = null;
                break;
            }
            if (intersection == null) {
                intersection = new HashSet<>(summary.fields().size());
                intersection.addAll(summary.fields().keySet());
            } else {
                intersection.retainAll(summary.fields().keySet());
            }
        }
        return intersection != null && intersection.containsAll(requested);
    }
Ensure the fields specified in {@link Presentation#getSummaryFields()} are available after filling phase.

@author stiankri
@author Steinar Knutsen
container-search/src/main/java/com/yahoo/search/yql/FieldFiller.java