analyzers = context.initLazyAnalyzers();
factory.startDirectoryProviders();
}
private static FilterCachingStrategy buildFilterCachingStrategy(Properties properties) {
FilterCachingStrategy filterCachingStrategy;
String impl = properties.getProperty( Environment.FILTER_CACHING_STRATEGY );
if ( StringHelper.isEmpty( impl ) || "mru".equalsIgnoreCase( impl ) ) {
filterCachingStrategy = new MRUFilterCachingStrategy();
}
else {
try {
Class filterCachingStrategyClass = org.hibernate.annotations.common.util.ReflectHelper.classForName( impl, SearchFactoryImpl.class );
filterCachingStrategy = (FilterCachingStrategy) filterCachingStrategyClass.newInstance();
}
catch (ClassNotFoundException e) {
throw new SearchException( "Unable to find filterCachingStrategy class: " + impl, e );
}
catch (IllegalAccessException e) {
throw new SearchException( "Unable to instantiate filterCachingStrategy class: " + impl, e );
}
catch (InstantiationException e) {
throw new SearchException( "Unable to instantiate filterCachingStrategy class: " + impl, e );
}
}
filterCachingStrategy.initialize( properties );
return filterCachingStrategy;
}