@Override
    public void fill(Result result, String summaryClass, Execution execution) {
        // always fill as requested first:
        execution.fill(result, summaryClass);
        Set<String> summaryFields = result.getQuery().getPresentation().getSummaryFields();
        if (summaryFields.isEmpty() || result.getQuery().properties().getBoolean(FIELD_FILLER_DISABLE)) {
            // no special handling:
            return;
        }
        String fromQuery = result.getQuery().getPresentation().getSummary();
        if (fromQuery == null) {
            // no special handling:
            return;
        }
        if (summaryClass == PartialSummaryHandler.PRESENTATION) {
            if (hasAll(summaryFields, fromQuery, result.getQuery().getModel().getRestrict())) {
                return;
            }
            // ensure we also fetch the summary class requested in query
            execution.fill(result, fromQuery);
            return;
        }
        if (! summaryClass.equals(fromQuery)) {
            // some special (programmatic) fill, top-level SearchHandler will call fill again later
            return;
        }
        if (hasAll(summaryFields, summaryClass, result.getQuery().getModel().getRestrict())) {
            // no more was needed:
            return;
        }
        // fetch the requested set (using the class with all fields)
        execution.fill(result, PartialSummaryHandler.ALL_FIELDS_CLASS);
    }
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