use of com.yahoo.prelude.searcher.JuniperSearcher in project vespa by vespa-engine.
the class JuniperSearcherTestCase method createSearchChain.
/**
* Creates a search chain which always returns a result with one hit containing information given in this
*
* @param sdName the search definition type of the returned hit
* @param content the content of the "dynteaser" field of the returned hit
*/
private Chain<Searcher> createSearchChain(String sdName, String content) {
JuniperSearcher searcher = new JuniperSearcher(new ComponentId("test"), new QrSearchersConfig(new QrSearchersConfig.Builder()));
DocumentSourceSearcher docsource = new DocumentSourceSearcher();
addResult(new Query("?query=12"), sdName, content, docsource);
addResult(new Query("?query=12&bolding=false"), sdName, content, docsource);
return new Chain<Searcher>(searcher, docsource);
}
Aggregations