public IndexedModelResult FillIndex() { try { var documentsToIndex = GetDocumentsForIndexing().ToList(); Index(documentsToIndex); return(_indexerDiagnosticService.GetSuccessResult(typeof(DocumentIndexer).Name, documentsToIndex)); } catch (Exception e) { return(_indexerDiagnosticService.GetFailedResult(e.Message + e.StackTrace, typeof(DocumentIndexer).Name)); } }
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)); } }
public virtual IndexedModelResult FillIndex() { try { var actualUsers = _intranetMemberService.GetAll().Where(u => !u.Inactive); var searchableUsers = actualUsers.Select(_searchableMemberMapper.Map).ToList(); _elasticMemberIndex.Index(searchableUsers); return(_indexerDiagnosticService.GetSuccessResult(typeof(MembersIndexer <T>).Name, searchableUsers)); } catch (Exception e) { return(_indexerDiagnosticService.GetFailedResult(e.Message + e.StackTrace, typeof(MembersIndexer <T>).Name)); } }
public IndexedModelResult FillIndex() { try { var activities = GetAll().Where(IsInCache); var searchableActivities = activities.Select(Map).ToList(); _activityIndex.DeleteByType(UintraSearchableTypeEnum.News); _activityIndex.Index(searchableActivities); return(_indexerDiagnosticService.GetSuccessResult(typeof(NewsService).Name, searchableActivities)); } catch (Exception e) { return(_indexerDiagnosticService.GetFailedResult(e.Message + e.StackTrace, typeof(NewsService).Name)); } }
public IndexedModelResult FillIndex() { try { var homePage = Umbraco.Web.Composing.Current.UmbracoHelper.ContentAtRoot().First(pc => pc.ContentType.Alias.Equals(_documentTypeAliasProvider.GetHomePage())); var contentPages = homePage.DescendantsOfType(_documentTypeAliasProvider.GetArticlePage()); var searchableContents = contentPages .Where(pc => _searchUmbracoHelper.IsSearchable(pc)) .Select(_searchUmbracoHelper.GetContent); _contentIndex.Index(searchableContents); return(_indexerDiagnosticService.GetSuccessResult(typeof(ContentIndexer).Name, searchableContents)); } catch (Exception e) { return(_indexerDiagnosticService.GetFailedResult(e.Message + e.StackTrace, typeof(ContentIndexer).Name)); } }