DataIndexer indexer = null;
if (DATA_INDEXER_ONE_PASS_VALUE.equals(dataIndexerName)) {
indexer = new OnePassDataIndexer(events, cutoff, sortAndMerge);
} else if (DATA_INDEXER_TWO_PASS_VALUE.equals(dataIndexerName)) {
indexer = new TwoPassDataIndexer(events, cutoff, sortAndMerge);
} else {
throw new IllegalStateException("Unexpected data indexer name: "
+ dataIndexerName);
}
return indexer;