Ejemplo n.º 1
0
        public void FillIndex()
        {
            var activities           = GetAll().Where(IsInCache);
            var searchableActivities = activities.Select(Map);

            _activityIndex.DeleteByType(UintraSearchableTypeEnum.News);
            _activityIndex.Index(searchableActivities);
        }
Ejemplo n.º 2
0
        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));
            }
        }