public static Worker createWorker(SearchConfiguration cfg, SearchFactoryImplementor searchFactoryImplementor) {
Properties props = getProperties( cfg );
String impl = props.getProperty( Environment.WORKER_SCOPE );
Worker worker;
if ( StringHelper.isEmpty( impl ) ) {
worker = new TransactionalWorker();
}
else if ( "transaction".equalsIgnoreCase( impl ) ) {
worker = new TransactionalWorker();
}
else {
worker = PluginLoader.instanceFromName( Worker.class,
impl, WorkerFactory.class, "worker" );
}