protected String ensureLegalSummaryClass(Query query, String summaryClass) {
        if (summaryClass != null) {
            if (summaryClass.isEmpty()) {
                return null;
            } else {
                var db = getDocumentDatabase(query);
                if (db != null) {
                    var partialSummaryHandler = new PartialSummaryHandler(db);
                    partialSummaryHandler.validateSummaryClass(summaryClass, query);
                }
            }
        }
        return summaryClass;
    }
Returns whether we need to send the query when fetching summaries.
This is necessary if the query requests summary features or dynamic snippeting.
container-search/src/main/java/com/yahoo/prelude/fastsearch/VespaBackend.java