Exemple #1
0
        public IIndexer <EventLog <TEventDTO> > CreateIndexerForEventLog <TEventDTO, TSearchDocument>(
            string indexName, Func <EventLog <TEventDTO>, TSearchDocument> mapper, int documentsPerBatch)
            where TEventDTO : class, IEventDTO, new() where TSearchDocument :  class, IHasId
        {
            var indexer = new ElasticEventIndexer <TEventDTO, TSearchDocument>(indexName, _elasticClient, mapper, documentsPerBatch);

            _indexers.Add(indexer);
            return(indexer);
        }
        public async Task <IEventIndexer <TEvent> > CreateEventIndexer <TEvent>(EventIndexDefinition <TEvent> searchIndexDefinition) where TEvent : class
        {
            await CreateIfNotExists(searchIndexDefinition);

            var indexer =
                new ElasticEventIndexer <TEvent>(_elasticClient, searchIndexDefinition);

            return(indexer);
        }
Exemple #3
0
        public IIndexer <EventLog <TEventDTO> > CreateIndexerForEventLog <TEventDTO>(string indexName, int documentsPerBatch)
            where TEventDTO : class, IEventDTO, new()
        {
            var indexDefinition = new EventIndexDefinition <TEventDTO>(indexName);
            var indexer         = new ElasticEventIndexer <TEventDTO>(indexName, _elasticClient, indexDefinition, documentsPerBatch);

            _indexers.Add(indexer);
            return(indexer);
        }
        public async Task <IEventIndexer <TEvent> > CreateEventIndexer <TEvent, TSearchDocument>(string indexName, IEventToSearchDocumentMapper <TEvent, TSearchDocument> mapper)
            where TEvent : class
            where TSearchDocument : class, IHasId, new()
        {
            await CreateIfNotExists(indexName);

            var indexer =
                new ElasticEventIndexer <TEvent, TSearchDocument>(_elasticClient, indexName, mapper);

            return(indexer);
        }