@Override
    public Result search(Query query, Execution execution) {
        // Pre execution: Choose template and sources
        List<PageElement> pages = selectPageTemplates(query);
        if (pages.isEmpty()) return execution.search(query); // Bypass if no page template chosen
        addSources(pages,query);

        // Set the page template list for inspection by other searchers
        query.properties().set(pagePageTemplateListName, pages);

        // Execute
        Result result = execution.search(query);

        // Post execution: Resolve choices and organize the result as dictated by the resolved template
        Choice pageTemplateChoice = Choice.createSingletons(pages);
        Resolution resolution = selectResolver(query).resolve(pageTemplateChoice, query, result);
        organizer.organize(pageTemplateChoice, resolution, result);
        return result;
    }
Creates this from an existing page template registry, using only built-in resolvers

@param templateRegistry the page template registry. This will be frozen by this call.
@param resolvers the resolvers to use, in addition to the default resolvers
container-search/src/main/java/com/yahoo/search/pagetemplates/PageTemplateSearcher.java