Esempio n. 1
0
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// Gets all the Searchable Module MetaData SearchDocuments within the timeframe for all portals
        /// </summary>
        /// -----------------------------------------------------------------------------
        private int GetAndStoreModuleMetaData(ModuleIndexer indexer)
        {
            IEnumerable <SearchDocument> searchDocs;
            var      portals = PortalController.Instance.GetPortals();
            DateTime indexSince;
            var      indexedCount = 0;

            //DateTime startDate

            foreach (var portal in portals.Cast <PortalInfo>())
            {
                indexSince = FixedIndexingStartDate(portal.PortalID);
                searchDocs = indexer.GetModuleMetaData(portal.PortalID, indexSince);
                StoreSearchDocuments(searchDocs);
                indexedCount += searchDocs.Count();
            }

            // Include Host Level Items
            indexSince = FixedIndexingStartDate(Null.NullInteger);
            searchDocs = indexer.GetModuleMetaData(Null.NullInteger, indexSince);
            StoreSearchDocuments(searchDocs);
            indexedCount += searchDocs.Count();

            return(indexedCount);
        }
Esempio n. 2
0
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// Gets all the Searchable Module MetaData SearchDocuments within the timeframe for the given portal
        /// </summary>
        /// <param name="portalId"></param>
        /// <param name="startDate"></param>
        /// <returns></returns>
        /// <history>
        ///     [vnguyen]   04/17/2013  created
        /// </history>
        /// -----------------------------------------------------------------------------
        private static IEnumerable <SearchDocument> GetModuleMetaData(int portalId, DateTime startDate)
        {
            var searchDocs = new List <SearchDocument>();
            var indexer    = new ModuleIndexer();
            var indexSince = FixedIndexingStartDate(portalId, startDate);

            searchDocs.AddRange(indexer.GetModuleMetaData(portalId, indexSince));

            return(searchDocs);
        }
Esempio n. 3
0
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// Gets all the Searchable Module MetaData SearchDocuments within the timeframe for all portals
        /// </summary>
        /// <param name="startDate"></param>
        /// <returns></returns>
        /// <history>
        ///     [vnguyen]   04/17/2013  created
        /// </history>
        /// -----------------------------------------------------------------------------
        private IEnumerable <SearchDocument> GetModuleMetaData(DateTime startDate)
        {
            var      searchDocs = new List <SearchDocument>();
            var      portals    = PortalController.Instance.GetPortals();
            var      indexer    = new ModuleIndexer();
            DateTime indexSince;

            foreach (var portal in portals.Cast <PortalInfo>())
            {
                indexSince = FixedIndexingStartDate(portal.PortalID, startDate);
                searchDocs.AddRange(indexer.GetModuleMetaData(portal.PortalID, indexSince));
            }

            // Include Host Level Items
            indexSince = FixedIndexingStartDate(-1, startDate);
            searchDocs.AddRange(indexer.GetSearchDocuments(-1, indexSince));

            return(searchDocs);
        }
Esempio n. 4
0
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// Gets all the Searchable Module MetaData SearchDocuments within the timeframe for the given portal
        /// </summary>
        /// <param name="portalId"></param>
        /// <param name="startDate"></param>
        /// <returns></returns>
        /// <history>
        ///     [vnguyen]   04/17/2013  created
        /// </history>
        /// -----------------------------------------------------------------------------
        private static IEnumerable<SearchDocument> GetModuleMetaData(int portalId, DateTime startDate)
        {
            var searchDocs = new List<SearchDocument>();
            var indexer = new ModuleIndexer();
            var indexSince = FixedIndexingStartDate(portalId, startDate);

            searchDocs.AddRange(indexer.GetModuleMetaData(portalId, indexSince));

            return searchDocs;
        }
Esempio n. 5
0
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// Gets all the Searchable Module MetaData SearchDocuments within the timeframe for all portals
        /// </summary>
        /// <param name="startDate"></param>
        /// <returns></returns>
        /// <history>
        ///     [vnguyen]   04/17/2013  created
        /// </history>
        /// -----------------------------------------------------------------------------
        private IEnumerable<SearchDocument> GetModuleMetaData(DateTime startDate)
        {
            var searchDocs = new List<SearchDocument>();
            var portalController = new PortalController();
            var portals = portalController.GetPortals();
            var indexer = new ModuleIndexer();
            DateTime indexSince;

            foreach (var portal in portals.Cast<PortalInfo>())
            {
                indexSince = FixedIndexingStartDate(portal.PortalID, startDate);
                searchDocs.AddRange(indexer.GetModuleMetaData(portal.PortalID, indexSince));
            }

            // Include Host Level Items
            indexSince = FixedIndexingStartDate(-1, startDate);
            searchDocs.AddRange(indexer.GetSearchDocuments(-1, indexSince));

            return searchDocs;
        }