예제 #1
0
        /// <summary>
        /// Initialize builders.
        /// </summary>
        protected virtual void InitiasizeBuilders()
        {
            var sectionsUIds = GlobalSearchIndexingSchemasRepository.GetIndexingSectionUIds(_userConnection).ToList();

            IndexingSectionListBuilder.IndexingSectionsUIds       = sectionsUIds;
            SingleIndexingSectionListBuilder.IndexingSectionsUIds = sectionsUIds;
            if (IgnoreEmails())
            {
                IndexingSectionListBuilder.AddEsqFuncFilter(ApplyActivityTypeFilter);
                IndexingSectionListBuilder.AddEsqFuncFilter(ApplyActivityFileTypeFilter);
                SingleIndexingSectionListBuilder.AddEsqFuncFilter(ApplyActivityTypeFilter);
                SingleIndexingSectionListBuilder.AddEsqFuncFilter(ApplyActivityFileTypeFilter);
            }
        }
예제 #2
0
 /// <summary>
 /// Gets single indexing entities.
 /// </summary>
 /// <returns>Indexing entities from single builders.</returns>
 protected virtual List <IndexingEntity> BuildSingleIndexingEntities()
 {
     try {
         List <IndexingEntity> singleIndexingDetailEntityList = SingleIndexingDetailListBuilder.Build();
         List <string>         parentSchemas = singleIndexingDetailEntityList.Select(x => x.ParentEntityName).ToList();
         SingleIndexingSectionListBuilder.SetIndexingType(parentSchemas, IndexingType.Upsert);
         var singleIndexingSectionEntityList = SingleIndexingSectionListBuilder.Build();
         singleIndexingSectionEntityList.AddRange(singleIndexingDetailEntityList);
         _log.Info("BuildSingleIndexingEntities entiites prepared succesfully.");
         return(singleIndexingSectionEntityList);
     }
     catch (Exception e) {
         _log.Error(e);
     }
     return(null);
 }