/// -----------------------------------------------------------------------------
        /// <summary>
        /// Gets all the Searchable Module MetaData SearchDocuments within the timeframe for all portals
        /// </summary>
        /// -----------------------------------------------------------------------------
        private int GetAndStoreModuleMetaData(ModuleIndexer indexer)
        {
            IEnumerable <SearchDocument> searchDocs;

            System.Collections.ArrayList portals = PortalController.Instance.GetPortals();
            DateTime indexSince;
            int      indexedCount = 0;

            //DateTime startDate

            foreach (PortalInfo 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);
        }
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// Indexes content within the given time farame
        /// </summary>
        /// -----------------------------------------------------------------------------
        internal void IndexContent()
        {
            //Index TAB META-DATA
            TabIndexer tabIndexer                 = new TabIndexer();
            int        searchDocsCount            = GetAndStoreSearchDocuments(tabIndexer);
            int        indexedSearchDocumentCount = searchDocsCount;

            AddIdexingResults("Tabs Indexed", searchDocsCount);

            //Index MODULE META-DATA from modules that inherit from ModuleSearchBase
            ModuleIndexer moduleIndexer = new ModuleIndexer(true);

            searchDocsCount             = GetAndStoreModuleMetaData(moduleIndexer);
            indexedSearchDocumentCount += searchDocsCount;
            AddIdexingResults("Modules (Metadata) Indexed", searchDocsCount);

            //Index MODULE CONTENT from modules that inherit from ModuleSearchBase
            searchDocsCount             = GetAndStoreSearchDocuments(moduleIndexer);
            indexedSearchDocumentCount += searchDocsCount;

            //Index all Defunct ISearchable module content
#pragma warning disable 0618
            SearchItemInfoCollection searchItems = GetContent(moduleIndexer);
            SearchDataStoreProvider.Instance().StoreSearchItems(searchItems);
#pragma warning restore 0618
            indexedSearchDocumentCount += searchItems.Count;

            //Both ModuleSearchBase and ISearchable module content count
            AddIdexingResults("Modules (Content) Indexed", searchDocsCount + searchItems.Count);

            if (!HostController.Instance.GetBoolean("DisableUserCrawling", false))
            {
                //Index User data
                UserIndexer userIndexer = new UserIndexer();
                int         userIndexed = GetAndStoreSearchDocuments(userIndexer);
                indexedSearchDocumentCount += userIndexed;
                AddIdexingResults("Users", userIndexed);
            }

            SchedulerItem.AddLogNote("<br/><b>Total Items Indexed: " + indexedSearchDocumentCount + "</b>");
        }