Example #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);
            }
        }
Example #2
0
 /// <summary>
 /// Gets indexing entities.
 /// </summary>
 /// <returns>Indexing entities from builders.</returns>
 protected virtual List <IndexingEntity> BuildIndexingEntities()
 {
     try {
         List <IndexingEntity> indexingDetailEntityList = IndexingDetailListBuilder.Build();
         List <string>         parentSchemas            = indexingDetailEntityList.Select(x => x.ParentEntityName).ToList();
         IndexingSectionListBuilder.SetIndexingType(parentSchemas, IndexingType.Upsert);
         var indexingSectionEntityList = IndexingSectionListBuilder.Build();
         indexingSectionEntityList.AddRange(indexingDetailEntityList);
         _log.Info("BuildIndexingEntities entiites prepared succesfully.");
         return(indexingSectionEntityList);
     }
     catch (Exception e) {
         _log.Error(e);
     }
     return(null);
 }