use of org.apache.sdap.mudrod.ssearch.Searcher in project incubator-sdap-mudrod by apache.
the class MudrodContextListener method contextInitialized.
/**
* @see ServletContextListener#contextInitialized(ServletContextEvent)
*/
@Override
public void contextInitialized(ServletContextEvent arg0) {
me = new MudrodEngine();
Properties props = me.loadConfig();
me.setESDriver(new ESDriver(props));
me.setSparkDriver(new SparkDriver(props));
ServletContext ctx = arg0.getServletContext();
Searcher searcher = new Searcher(props, me.getESDriver(), null);
Ranker ranker = new Ranker(props, me.getESDriver(), me.getSparkDriver());
ctx.setAttribute("MudrodInstance", me);
ctx.setAttribute("MudrodSearcher", searcher);
ctx.setAttribute("MudrodRanker", ranker);
}
Aggregations