Search in sources :

Example 1 with TiledTemplateSet

use of com.yahoo.prelude.templates.TiledTemplateSet in project vespa by vespa-engine.

the class TilingTestCase method callSearchAndSetRenderer.

private Result callSearchAndSetRenderer(Chain<Searcher> chain, Query query) {
    Execution.Context context = new Execution.Context(null, null, null, new RendererRegistry(MoreExecutors.directExecutor()), new SimpleLinguistics());
    Result result = new Execution(chain, context).search(query);
    result.getTemplating().setRenderer(new SearchRendererAdaptor(new TiledTemplateSet()));
    return result;
}
Also used : SimpleLinguistics(com.yahoo.language.simple.SimpleLinguistics) Execution(com.yahoo.search.searchchain.Execution) TiledTemplateSet(com.yahoo.prelude.templates.TiledTemplateSet) SearchRendererAdaptor(com.yahoo.prelude.templates.SearchRendererAdaptor) RendererRegistry(com.yahoo.search.rendering.RendererRegistry) Result(com.yahoo.search.Result)

Aggregations

SimpleLinguistics (com.yahoo.language.simple.SimpleLinguistics)1 SearchRendererAdaptor (com.yahoo.prelude.templates.SearchRendererAdaptor)1 TiledTemplateSet (com.yahoo.prelude.templates.TiledTemplateSet)1 Result (com.yahoo.search.Result)1 RendererRegistry (com.yahoo.search.rendering.RendererRegistry)1 Execution (com.yahoo.search.searchchain.Execution)1