public async Task RecreateIndexAsync() { var response = await _elasticSearchService.RecreateIndexAsync <TIndex>(); if (!response.IsOk) { Logger.LogError(response.Exception, $"An error occurred during recreate index {typeof(TIndex).Name}"); throw new ElasticSearchException($"An error occurred during recreate index {typeof(TIndex).Name}", response.Exception); } }