private static void loadSearch(ConfigServer configServer, ConfigImpl config, Document doc, Log log) {
	try {
	    Element search = getChildByName(doc.getDocumentElement(), "search");

	    // class
	    ClassDefinition<SearchEngine> cd = getClassDefinition(search, "engine-", config.getIdentification());
	    if (!cd.hasClass() || "lucee.runtime.search.lucene.LuceneSearchEngine".equals(cd.getClassName())) {
		if (configServer != null) cd = ((ConfigImpl) configServer).getSearchEngineClassDefinition();
		else cd = new ClassDefinitionImpl(DummySearchEngine.class);
	    }

	    // directory
	    String dir = search.getAttribute("directory");
	    if (StringUtil.isEmpty(dir)) {
		if (configServer != null) dir = ((ConfigImpl) configServer).getSearchEngineDirectory();
		else dir = "{lucee-web}/search/";
	    }

	    config.setSearchEngine(cd, dir);
	}
	catch (Exception e) {
	    log(config, log, e);
	}
    }
private static void loadSearch ( ConfigServer configServer , ConfigImpl config , Document doc , Log log ) { try { Element search = getChildByName ( doc . getDocumentElement ( ) , "search" ) ; ClassDefinition < SearchEngine > cd = getClassDefinition ( search , "engine-" , config . getIdentification ( ) ) ; if ( ! cd . hasClass ( ) || "lucee.runtime.search.lucene.LuceneSearchEngine" . equals ( cd . getClassName ( ) ) ) { if ( configServer != null ) cd = ( ( ConfigImpl ) configServer ) . getSearchEngineClassDefinition ( ) ; else cd = new ClassDefinitionImpl ( DummySearchEngine . class ) ; } String dir = search . getAttribute ( "directory" ) ; if ( StringUtil . isEmpty ( dir ) ) { if ( configServer != null ) dir = ( ( ConfigImpl ) configServer ) . getSearchEngineDirectory ( ) ; else dir = "{lucee-web}/search/" ; } config . setSearchEngine ( cd , dir ) ; } catch ( Exception e ) { log ( config , log , e ) ; } }
@param configServer
@param config
@param doc
@throws PageException