public async Task <IEventIndexProcessor <TEvent> > AddAsync <TEvent, TSearchDocument>( string indexName, Func <EventLog <TEvent>, TSearchDocument> mappingFunc, IEnumerable <ITransactionHandler> functionHandlers = null) where TEvent : class, new() where TSearchDocument : class, IHasId, new() { var indexer = await _elasticSearchService.CreateEventIndexer(indexName, mappingFunc); _indexers.Add(indexer); return(CreateProcessor(functionHandlers, indexer)); }