public void FillIndex() { var tags = _userTagProvider.GetAll(); var searchableTags = tags.Select(Map); _elasticTagIndex.Index(searchableTags); }
public IndexedModelResult FillIndex() { try { var tags = _userTagProvider.GetAll(); var searchableTags = tags.Select(Map).ToList(); _elasticTagIndex.Index(searchableTags); return(_indexerDiagnosticService.GetSuccessResult(typeof(UserTagsSearchIndexer).Name, searchableTags)); } catch (Exception e) { return(_indexerDiagnosticService.GetFailedResult(e.Message + e.StackTrace, typeof(UserTagsSearchIndexer).Name)); } }