public void validateSummaryClass(String summaryClass, Query query) {
        if (isFieldListRequest(summaryClass)) {
            var fieldSet = parseFieldList(summaryClass);
            if (fieldSet.isEmpty()) {
                throw new IllegalArgumentException("invalid fill() with empty fieldset=" + summaryClass);
            }
        } else if (isPresentationRequest(summaryClass)) {
            String wantClass = query.getPresentation().getSummary();
            if (! ensureKnownClass(wantClass)) {
                throw new IllegalInputException("invalid presentation.summary=" + wantClass);
            }
        } else if (summaryClass != null) {
            if (! ensureKnownClass(summaryClass)) {
                throw new IllegalArgumentException("invalid fill() with summaryClass=" + summaryClass);
            }
        }
    }
resolve summary class to use when none provided
container-search/src/main/java/com/yahoo/prelude/fastsearch/PartialSummaryHandler.java