}
AnalyzerManager analyzerM = null;
try {
indexer_busy = true;
Indexer indexer = (Indexer) this.manager.lookup(indexer_role);
// update maybe the analyzer
analyzerM = (AnalyzerManager) this.manager
.lookup(AnalyzerManager.ROLE);
String analyzerId = getDefaultAnalyzerID();
if (analyzerId != null) {
Analyzer analyzer = analyzerM.getAnalyzer(analyzerId);
indexer.setAnalyzer(analyzer);
}
indexer.setIndex(directory);
return indexer;
} catch (ServiceException ex1) {
throw new IndexException(ex1);
} catch (ConfigurationException ex2) {