public ElasticsearchStorage(string endpoint, bool requiresProjectGraph = false) { Contract.Requires(!string.IsNullOrEmpty(endpoint)); m_provider = ElasticProvider.Create(endpoint); m_requiresProjectGraph = requiresProjectGraph; UpdateProjects(); }
public async Task CreateEvent(long userId, EventItem eventItem, CancellationToken cancellationToken) { var eventEntity = Map(eventItem); eventEntity.UserId = userId; eventEntity.EventId = Guid.NewGuid().ToString("n"); await _elasticProvider.Create <EventEntity>(eventEntity, Elasticsearch.Net.Refresh.True, cancellationToken); }
public async Task CreateUser(ApplicationUser applicationUser, CancellationToken cancellationToken) { await _elasticProvider.Create(Map(applicationUser), Elasticsearch.Net.Refresh.True, cancellationToken); }