コード例 #1
0
        protected SearchItemInfoCollection GetContent(int portalId, IndexingProvider indexer)
        {
            var searchItems = new SearchItemInfoCollection();

            searchItems.AddRange(indexer.GetSearchIndexItems(portalId));
            return(searchItems);
        }
コード例 #2
0
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// GetContent gets the Portal's content and passes it to the Indexer
        /// </summary>
        /// <remarks>
        /// </remarks>
        /// <param name="PortalID">The Id of the Portal</param>
        /// <param name="Indexer">The Index Provider that will index the content of the portal</param>
        /// <history>
        ///		[cnurse]	11/15/2004	documented
        /// </history>
        /// -----------------------------------------------------------------------------
        protected SearchItemInfoCollection GetContent(int PortalID, IndexingProvider Indexer)
        {
            var SearchItems = new SearchItemInfoCollection();

            SearchItems.AddRange(Indexer.GetSearchIndexItems(PortalID));
            return(SearchItems);
        }
コード例 #3
0
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// Gets all the Search Documents for the given timeframe.
        /// </summary>
        /// <param name="indexer"></param>
        /// -----------------------------------------------------------------------------
        private int GetAndStoreSearchDocuments(IndexingProvider indexer)
        {
            var      portals = PortalController.Instance.GetPortals();
            DateTime indexSince;
            var      indexedCount = 0;

            foreach (var portal in portals.Cast <PortalInfo>())
            {
                indexSince = FixedIndexingStartDate(portal.PortalID);
                try
                {
                    indexedCount += indexer.IndexSearchDocuments(
                        portal.PortalID, SchedulerItem, indexSince, StoreSearchDocuments);
                }
                catch (NotImplementedException)
                {
                    //Nothing to do, no fallback
                }
            }

            // Include Host Level Items
            indexSince = FixedIndexingStartDate(-1);
            try
            {
                indexedCount += indexer.IndexSearchDocuments(
                    Null.NullInteger, SchedulerItem, indexSince, StoreSearchDocuments);
            }
            catch (NotImplementedException)
            {
                //Again no fallback
            }
            return(indexedCount);
        }
コード例 #4
0
ファイル: SearchEngine.cs プロジェクト: fmenci/Dnn.Platform
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// Gets all the Search Documents within the timeframe for the given portal
        /// </summary>
        /// <param name="portalId"></param>
        /// <param name="indexer"></param>
        /// <param name="startDate"></param>
        /// <returns></returns>
        /// <history>
        ///     [vnguyen]   04/17/2013  created
        /// </history>
        /// -----------------------------------------------------------------------------
        private IEnumerable <SearchDocument> GetSearchDocuments(int portalId, IndexingProvider indexer, DateTime startDate)
        {
            var searchDocs = new List <SearchDocument>();
            var indexSince = FixedIndexingStartDate(portalId, startDate);

            searchDocs.AddRange(indexer.GetSearchDocuments(portalId, indexSince));
            return(searchDocs);
        }
コード例 #5
0
        /// <Summary>
        /// GetContent gets the Portal's content and passes it to the Indexer
        /// </Summary>
        /// <Param name="PortalID">The Id of the Portal</Param>
        /// <Param name="Indexer">
        /// The Index Provider that will index the content of the portal
        /// </Param>
        protected SearchItemInfoCollection GetContent( int PortalID, IndexingProvider Indexer )
        {
            SearchItemInfoCollection SearchItems = new SearchItemInfoCollection();

            SearchItems.AddRange(Indexer.GetSearchIndexItems(PortalID));

            return SearchItems;
        }
コード例 #6
0
        protected SearchItemInfoCollection GetContent(IndexingProvider indexer)
        {
            var searchItems = new SearchItemInfoCollection();
            var portals     = PortalController.Instance.GetPortals();

            for (var index = 0; index <= portals.Count - 1; index++)
            {
                var portal = (PortalInfo)portals[index];
                searchItems.AddRange(indexer.GetSearchIndexItems(portal.PortalID));
            }
            return(searchItems);
        }
コード例 #7
0
ファイル: SearchEngine.cs プロジェクト: fmenci/Dnn.Platform
        protected SearchItemInfoCollection GetContent(IndexingProvider indexer)
        {
            var searchItems = new SearchItemInfoCollection();
            var objPortals  = new PortalController();
            var arrPortals  = objPortals.GetPortals();
            int intPortal;

            for (intPortal = 0; intPortal <= arrPortals.Count - 1; intPortal++)
            {
                var objPortal = (PortalInfo)arrPortals[intPortal];
                searchItems.AddRange(indexer.GetSearchIndexItems(objPortal.PortalID));
            }
            return(searchItems);
        }
コード例 #8
0
        /// <Summary>
        /// GetContent gets all the content and passes it to the Indexer
        /// </Summary>
        /// <Param name="Indexer">
        /// The Index Provider that will index the content of the portal
        /// </Param>
        protected SearchItemInfoCollection GetContent( IndexingProvider Indexer )
        {
            SearchItemInfoCollection SearchItems = new SearchItemInfoCollection();
            PortalController objPortals = new PortalController();
            PortalInfo objPortal;

            ArrayList arrPortals = objPortals.GetPortals();
            int intPortal;
            for (intPortal = 0; intPortal <= arrPortals.Count - 1; intPortal++)
            {
                objPortal = (PortalInfo)arrPortals[intPortal];

                SearchItems.AddRange(Indexer.GetSearchIndexItems(objPortal.PortalID));
            }
            return SearchItems;
        }
コード例 #9
0
        /// <Summary>
        /// GetContent gets all the content and passes it to the Indexer
        /// </Summary>
        /// <Param name="Indexer">
        /// The Index Provider that will index the content of the portal
        /// </Param>
        protected SearchItemInfoCollection GetContent(IndexingProvider Indexer)
        {
            SearchItemInfoCollection SearchItems = new SearchItemInfoCollection();
            PortalController         objPortals  = new PortalController();
            PortalInfo objPortal;

            ArrayList arrPortals = objPortals.GetPortals();
            int       intPortal;

            for (intPortal = 0; intPortal <= arrPortals.Count - 1; intPortal++)
            {
                objPortal = (PortalInfo)arrPortals[intPortal];

                SearchItems.AddRange(Indexer.GetSearchIndexItems(objPortal.PortalID));
            }
            return(SearchItems);
        }
コード例 #10
0
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// Gets all the Search Documents for the given timeframe.
        /// </summary>
        /// <param name="indexer"></param>
        /// <param name="startDate"></param>
        /// <returns></returns>
        /// <history>
        ///     [vnguyen]   04/17/2013  created
        /// </history>
        /// -----------------------------------------------------------------------------
        private IEnumerable <SearchDocument> GetSearchDocuments(IndexingProvider indexer, DateTime startDate)
        {
            var      searchDocs = new List <SearchDocument>();
            var      portals    = PortalController.Instance.GetPortals();
            DateTime indexSince;

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

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

            return(searchDocs);
        }
コード例 #11
0
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// Gets all the Search Documents for the given timeframe.
        /// </summary>
        /// <param name="indexer"></param>
        /// -----------------------------------------------------------------------------
        private int GetAndStoreSearchDocuments(IndexingProvider indexer)
        {
            IList <SearchDocument> searchDocs;
            var      portals = PortalController.Instance.GetPortals();
            DateTime indexSince;
            var      indexedCount = 0;

            foreach (var portal in portals.Cast <PortalInfo>())
            {
                indexSince = FixedIndexingStartDate(portal.PortalID);
                try
                {
                    indexedCount += indexer.IndexSearchDocuments(
                        portal.PortalID, SchedulerItem, indexSince, StoreSearchDocuments);
                }
                catch (NotImplementedException)
                {
#pragma warning disable 618
                    searchDocs = indexer.GetSearchDocuments(portal.PortalID, indexSince).ToList();
#pragma warning restore 618
                    StoreSearchDocuments(searchDocs);
                    indexedCount += searchDocs.Count();
                }
            }

            // Include Host Level Items
            indexSince = FixedIndexingStartDate(-1);
            try
            {
                indexedCount += indexer.IndexSearchDocuments(
                    Null.NullInteger, SchedulerItem, indexSince, StoreSearchDocuments);
            }
            catch (NotImplementedException)
            {
#pragma warning disable 618
                searchDocs = indexer.GetSearchDocuments(-1, indexSince).ToList();
#pragma warning restore 618
                StoreSearchDocuments(searchDocs);
                indexedCount += searchDocs.Count();
            }
            return(indexedCount);
        }
コード例 #12
0
ファイル: SearchEngine.cs プロジェクト: rrsc/Dnn.Platform
 /// -----------------------------------------------------------------------------
 /// <summary>
 /// Gets all the Search Documents within the timeframe for the given portal
 /// </summary>
 /// <param name="portalId"></param>
 /// <param name="indexer"></param>
 /// <param name="startDate"></param>
 /// <returns></returns>
 /// <history>
 ///     [vnguyen]   04/17/2013  created
 /// </history>
 /// -----------------------------------------------------------------------------
 private IEnumerable<SearchDocument> GetSearchDocuments(int portalId, IndexingProvider indexer, DateTime startDate)
 {
     var searchDocs = new List<SearchDocument>();
     var indexSince = FixedIndexingStartDate(portalId, startDate);
     searchDocs.AddRange(indexer.GetSearchDocuments(portalId, indexSince));
     return searchDocs;
 }
コード例 #13
0
        /// <Summary>IndexContent indexes the Portal's content</Summary>
        /// <Param name="PortalID">The Id of the Portal</Param>
        public void IndexContent(int PortalID)
        {
            IndexingProvider indexer = IndexingProvider.Instance();

            SearchDataStoreProvider.Instance().StoreSearchItems(this.GetContent(PortalID, indexer));
        }
コード例 #14
0
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// IndexContent indexes all Portal content
        /// </summary>
        /// <remarks>
        /// </remarks>
        /// <history>
        ///		[cnurse]	11/15/2004	documented
        /// </history>
        /// -----------------------------------------------------------------------------
        public void IndexContent()
        {
            IndexingProvider Indexer = IndexingProvider.Instance();

            SearchDataStoreProvider.Instance().StoreSearchItems(GetContent(Indexer));
        }
コード例 #15
0
ファイル: SearchEngine.cs プロジェクト: rrsc/Dnn.Platform
 protected SearchItemInfoCollection GetContent(int portalId, IndexingProvider indexer)
 {
     var searchItems = new SearchItemInfoCollection();
     searchItems.AddRange(indexer.GetSearchIndexItems(portalId));
     return searchItems;
 }
コード例 #16
0
 // dynamically create provider
 private static void CreateProvider()
 {
     objProvider = (IndexingProvider)Reflection.CreateObject("searchIndex");
 }
コード例 #17
0
ファイル: SearchEngine.cs プロジェクト: rrsc/Dnn.Platform
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// Gets all the Search Documents for the given timeframe.
        /// </summary>
        /// <param name="indexer"></param>
        /// <param name="startDate"></param>
        /// <returns></returns>
        /// <history>
        ///     [vnguyen]   04/17/2013  created
        /// </history>
        /// -----------------------------------------------------------------------------
        private IEnumerable<SearchDocument> GetSearchDocuments(IndexingProvider indexer, DateTime startDate)
        {
            var searchDocs = new List<SearchDocument>();
            var portalController = new PortalController();
            var portals = portalController.GetPortals();
            DateTime indexSince;

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

            // Include Host Level Items
            indexSince = FixedIndexingStartDate(-1, startDate);
            searchDocs.AddRange(indexer.GetSearchDocuments(-1, indexSince));
            
            return searchDocs;
        }
コード例 #18
0
ファイル: SearchEngine.cs プロジェクト: rjallepalli/PIX_CMS
 protected SearchItemInfoCollection GetContent(IndexingProvider indexer)
 {
     var searchItems = new SearchItemInfoCollection();
     var portals = PortalController.Instance.GetPortals();
     for (var index = 0; index <= portals.Count - 1; index++)
     {
         var portal = (PortalInfo) portals[index];
         searchItems.AddRange(indexer.GetSearchIndexItems(portal.PortalID));
     }
     return searchItems;
 }
コード例 #19
0
ファイル: SearchEngine.cs プロジェクト: rrsc/Dnn.Platform
 protected SearchItemInfoCollection GetContent(IndexingProvider indexer)
 {
     var searchItems = new SearchItemInfoCollection();
     var objPortals = new PortalController();
     var arrPortals = objPortals.GetPortals();
     int intPortal;
     for (intPortal = 0; intPortal <= arrPortals.Count - 1; intPortal++)
     {
         var objPortal = (PortalInfo) arrPortals[intPortal];
         searchItems.AddRange(indexer.GetSearchIndexItems(objPortal.PortalID));
     }
     return searchItems;
 }
コード例 #20
0
 // dynamically create provider
 private static void CreateProvider()
 {
     objProvider = (IndexingProvider)Reflection.CreateObject("searchIndex");
 }