Resource configDir = config.getConfigDir();
Element search = getChildByName(doc.getDocumentElement(), "search");
String strEngineClass = search.getAttribute("engine-class");
SearchEngine se = null;
Object o = ClassUtil.loadInstance(strEngineClass, (Object) null);
if (o instanceof SearchEngine)
se = (SearchEngine) o;
if (se == null)
se = new railo.runtime.search.lucene2.LuceneSearchEngine();
try {
// Logger
String strLogger = search.getAttribute("log");
int logLevel = LogUtil.toIntType(search.getAttribute("log-level"), Log.LEVEL_ERROR);
LogAndSource log = ConfigWebUtil.getLogAndSource(configServer, config, strLogger, true, logLevel);
// Init
se.init(config, ConfigWebUtil.getFile(configDir, ConfigWebUtil.translateOldPath(search.getAttribute("directory")), "search", configDir, FileUtil.TYPE_DIR, config), log);
}
catch (Exception e) {
throw Caster.toPageException(e);
}