public static CompletableFuture<Boolean> asyncRender(Result result,
                                                         Query query,
                                                         Renderer<Result> renderer,
                                                         OutputStream stream) {
        SearchResponse.trimHits(result);
        SearchResponse.removeEmptySummaryFeatureFields(result);
        return renderer.renderResponse(stream, result, query.getModel().getExecution(), query);
    }
Copy custom HTTP headers from the search result over to the HTTP response.

@param outputHeaders the headers which will be sent to a client
@param searchHeaders the headers from the search result, or null
container-search/src/main/java/com/yahoo/search/handler/HttpSearchResponse.java